Skip to content

Commit

Permalink
Fix logging for SystemV packages
Browse files Browse the repository at this point in the history
The current implementation has no effect; nothing is logged. '>>' seems
to be passed to the process as a parameter and not something that is
interpretted by the shell.

This approach is in line with the accepted solution suggested at
https://stackoverflow.com/a/21029952/183863

Fixes sbt#1021
  • Loading branch information
timcharper committed Aug 28, 2017
1 parent a412d46 commit 706eef5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ start_daemon() {
fi

if [ "$create_pidfile" = true ]; then
start-stop-daemon --background --chdir ${{chdir}} --chuid "$DAEMON_USER" --make-pidfile --pidfile "$PIDFILE" --startas "$RUN_CMD" --start -- $RUN_OPTS ${stdout_redirect}
start-stop-daemon --background --chdir ${{chdir}} --chuid "$DAEMON_USER" --make-pidfile --pidfile "$PIDFILE" --startas /bin/sh --start -- -c "exec $RUN_CMD $RUN_OPTS ${stdout_redirect}"
else
start-stop-daemon --background --chdir ${{chdir}} --chuid "$DAEMON_USER" --pidfile "$PIDFILE" --startas "$RUN_CMD" --start -- $RUN_OPTS ${stdout_redirect}
start-stop-daemon --background --chdir ${{chdir}} --chuid "$DAEMON_USER" --pidfile "$PIDFILE" --startas /bin/sh --start -- -c "exec $RUN_CMD $RUN_OPTS ${stdout_redirect}"
fi
log_end_msg $?
}
Expand Down

0 comments on commit 706eef5

Please sign in to comment.