diff --git a/src/main/resources/com/typesafe/sbt/packager/archetypes/systemloader/systemv/start-debian-template b/src/main/resources/com/typesafe/sbt/packager/archetypes/systemloader/systemv/start-debian-template index 04c5ee9d9..f2d197e84 100644 --- a/src/main/resources/com/typesafe/sbt/packager/archetypes/systemloader/systemv/start-debian-template +++ b/src/main/resources/com/typesafe/sbt/packager/archetypes/systemloader/systemv/start-debian-template @@ -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 $? }