From 5a6d8a65c3077aa2ef601042dcc94bd29134bbad Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 9 Jun 2010 23:53:31 +0000 Subject: [PATCH] Cleaning up CH_USER git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1968 7e9141cc-0065-0410-87d8-b60c137991c4 --- jetty-distribution/src/main/resources/bin/jetty.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jetty-distribution/src/main/resources/bin/jetty.sh b/jetty-distribution/src/main/resources/bin/jetty.sh index a6f1230d589..83f58085026 100755 --- a/jetty-distribution/src/main/resources/bin/jetty.sh +++ b/jetty-distribution/src/main/resources/bin/jetty.sh @@ -464,9 +464,12 @@ case "$ACTION" in if type start-stop-daemon > /dev/null 2>&1 then - [ -z "$JETTY_USER" ] && JETTY_USER=$USER - (( UID == 0 )) && CH_USER=-c$JETTY_USER - if start-stop-daemon -S -p"$JETTY_PID" "$CH_USER" -d"$JETTY_HOME" -b -m -a "$JAVA" -- "${RUN_ARGS[@]} --daemon" + unset CH_USER + if [ -n "$JETTY_USER" ] + then + CH_USER="-c$JETTY_USER" + fi + if start-stop-daemon -S -p"$JETTY_PID" $CH_USER -d"$JETTY_HOME" -b -m -a "$JAVA" -- "${RUN_ARGS[@]} --daemon" then sleep 1 if running "$JETTY_PID"