From 9ab951f20c1078caeef9fa05d08b9ef3c4421685 Mon Sep 17 00:00:00 2001 From: Jens Grassel Date: Tue, 16 May 2017 13:44:52 +0200 Subject: [PATCH] Prevent empty double quotes in start daemon line. The removal of the quotes should fix this if no `stdout_redirect` is set. --- .../archetypes/systemloader/systemv/start-debian-template | 4 ++-- src/sbt-test/debian/sysvinit-deb/build.sbt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 46d6cff43..4b67a55ad 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 @@ -48,9 +48,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 "$RUN_CMD" --start -- $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 "$RUN_CMD" --start -- $RUN_OPTS ${stdout_redirect} fi log_end_msg $? } diff --git a/src/sbt-test/debian/sysvinit-deb/build.sbt b/src/sbt-test/debian/sysvinit-deb/build.sbt index af313dfd7..2d6bf4521 100644 --- a/src/sbt-test/debian/sysvinit-deb/build.sbt +++ b/src/sbt-test/debian/sysvinit-deb/build.sbt @@ -49,7 +49,7 @@ TaskKey[Unit]("check-startup-script") <<= (target, streams) map { (target, out) ) assert( script.contains( - """start-stop-daemon --background --chdir /usr/share/debian-test --chuid "$DAEMON_USER" --make-pidfile --pidfile "$PIDFILE" --startas "$RUN_CMD" --start -- $RUN_OPTS "$stdout_redirect""" + """start-stop-daemon --background --chdir /usr/share/debian-test --chuid "$DAEMON_USER" --make-pidfile --pidfile "$PIDFILE" --startas "$RUN_CMD" --start -- $RUN_OPTS ${stdout_redirect}""" ), "script has wrong startup line\n" + script )