NIFI-2689 - improve foreground run mode of nifi

* add exec to RUN_NIFI_CMD
* remove subshell for else
* tested compatible with runit with these changes

This closes #966.

Signed-off-by: Aldrin Piri <aldrin@apache.org>
This commit is contained in:
Hunter Morgan 2016-08-29 09:55:49 -04:00 committed by Aldrin Piri
parent 0aa4b72678
commit df91169512
No known key found for this signature in database
GPG Key ID: 531AEBAA4CFE5D00
1 changed files with 2 additions and 2 deletions

View File

@ -290,12 +290,12 @@ run() {
BOOTSTRAP_DIR_PARAMS="${BOOTSTRAP_LOG_PARAMS} ${BOOTSTRAP_PID_PARAMS} ${BOOTSTRAP_CONF_PARAMS}"
RUN_NIFI_CMD="cd "\""${NIFI_HOME}"\"" && ${sudo_cmd_prefix} "\""${JAVA}"\"" -cp "\""${BOOTSTRAP_CLASSPATH}"\"" -Xms12m -Xmx24m ${BOOTSTRAP_DIR_PARAMS} org.apache.nifi.bootstrap.RunNiFi"
RUN_NIFI_CMD="cd "\""${NIFI_HOME}"\"" && exec ${sudo_cmd_prefix} "\""${JAVA}"\"" -cp "\""${BOOTSTRAP_CLASSPATH}"\"" -Xms12m -Xmx24m ${BOOTSTRAP_DIR_PARAMS} org.apache.nifi.bootstrap.RunNiFi"
if [ "$1" = "start" ]; then
(eval $RUN_NIFI_CMD $@ &)
else
(eval $RUN_NIFI_CMD $@)
eval $RUN_NIFI_CMD $@
fi
EXIT_STATUS=$?