From dfd32e6790af7db942ab3b997f379d87b4331b57 Mon Sep 17 00:00:00 2001 From: btpka3 Date: Fri, 30 Jan 2015 12:15:27 +0800 Subject: [PATCH] execute throuth ssh without hanging `ssh root@192.168.1.100 "service jetty restart"` will not exit after start. https://github.com/eclipse/jetty.project/pull/36 Signed-off-by: btpka3 --- jetty-distribution/src/main/resources/bin/jetty.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jetty-distribution/src/main/resources/bin/jetty.sh b/jetty-distribution/src/main/resources/bin/jetty.sh index 043d205177a..f00d8031ce1 100755 --- a/jetty-distribution/src/main/resources/bin/jetty.sh +++ b/jetty-distribution/src/main/resources/bin/jetty.sh @@ -457,11 +457,11 @@ case "$ACTION" in chown "$JETTY_USER" "$JETTY_PID" # FIXME: Broken solution: wordsplitting, pathname expansion, arbitrary command execution, etc. su - "$JETTY_USER" $SU_SHELL -c " - exec ${RUN_CMD[*]} start-log-file="$JETTY_LOGS/start.log" & + exec ${RUN_CMD[*]} start-log-file="$JETTY_LOGS/start.log" > /dev/null & disown \$! echo \$! > '$JETTY_PID'" else - "${RUN_CMD[@]}" & + "${RUN_CMD[@]}" > /dev/null & disown $! echo $! > "$JETTY_PID" fi