Issue #7008 - fix jetty.sh

+ Minor fix to remove extra LF output in RUN_ARGS
+ Using start-stop-daemon options properly

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2021-10-18 09:39:37 -05:00
parent 2095fb06d6
commit cdba235db6
No known key found for this signature in database
GPG Key ID: 2D0E1FB8FE4B68B4
1 changed files with 9 additions and 3 deletions

View File

@ -433,7 +433,7 @@ case "`uname`" in
CYGWIN*) JETTY_START="`cygpath -w $JETTY_START`";;
esac
RUN_ARGS=$(echo $JAVA_OPTIONS ; "$JAVA" -jar "$JETTY_START" --dry-run=opts,path,main,args ${JETTY_ARGS[*]})
RUN_ARGS=$(echo -ne $JAVA_OPTIONS ; "$JAVA" -jar "$JETTY_START" --dry-run=opts,path,main,args ${JETTY_ARGS[*]})
RUN_CMD=("$JAVA" ${RUN_ARGS[@]})
#####################################################
@ -462,10 +462,16 @@ case "$ACTION" in
unset CH_USER
if [ -n "$JETTY_USER" ]
then
CH_USER="-c$JETTY_USER"
CH_USER="--chuid $JETTY_USER"
fi
start-stop-daemon -S -p"$JETTY_PID" $CH_USER -d"$JETTY_BASE" -b -m -a "$JAVA" -- "${RUN_ARGS[@]}" start-log-file="$JETTY_START_LOG"
start-stop-daemon --start $CH_USER \
--pidfile "$JETTY_PID" \
--chdir "$JETTY_BASE" \
--background \
--make-pidfile \
--startas "$JAVA" \
-- ${RUN_ARGS[@]} start-log-file="$JETTY_START_LOG"
else