Skip to content

Commit 03a6378

Browse files
jan0schmuuki88
authored andcommitted
Prevent empty double quotes in start daemon line.
The removal of the quotes should fix this if no `stdout_redirect` is set.
1 parent c233973 commit 03a6378

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/resources/com/typesafe/sbt/packager/archetypes/systemloader/systemv/start-debian-template

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ start_daemon() {
4848
fi
4949

5050
if [ "$create_pidfile" = true ]; then
51-
start-stop-daemon --background --chdir ${{chdir}} --chuid "$DAEMON_USER" --make-pidfile --pidfile "$PIDFILE" --startas "$RUN_CMD" --start -- $RUN_OPTS "$stdout_redirect"
51+
start-stop-daemon --background --chdir ${{chdir}} --chuid "$DAEMON_USER" --make-pidfile --pidfile "$PIDFILE" --startas "$RUN_CMD" --start -- $RUN_OPTS ${stdout_redirect}
5252
else
53-
start-stop-daemon --background --chdir ${{chdir}} --chuid "$DAEMON_USER" --pidfile "$PIDFILE" --startas "$RUN_CMD" --start -- $RUN_OPTS "$stdout_redirect"
53+
start-stop-daemon --background --chdir ${{chdir}} --chuid "$DAEMON_USER" --pidfile "$PIDFILE" --startas "$RUN_CMD" --start -- $RUN_OPTS ${stdout_redirect}
5454
fi
5555
log_end_msg $?
5656
}

src/sbt-test/debian/sysvinit-deb/build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ TaskKey[Unit]("check-startup-script") <<= (target, streams) map { (target, out)
4949
)
5050
assert(
5151
script.contains(
52-
"""start-stop-daemon --background --chdir /usr/share/debian-test --chuid "$DAEMON_USER" --make-pidfile --pidfile "$PIDFILE" --startas "$RUN_CMD" --start -- $RUN_OPTS "$stdout_redirect"""
52+
"""start-stop-daemon --background --chdir /usr/share/debian-test --chuid "$DAEMON_USER" --make-pidfile --pidfile "$PIDFILE" --startas "$RUN_CMD" --start -- $RUN_OPTS ${stdout_redirect}"""
5353
),
5454
"script has wrong startup line\n" + script
5555
)

0 commit comments

Comments
 (0)