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 <btpka3@163.com>
This commit is contained in:
parent
6492ef7c78
commit
e571108030
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue