diff mbox

[dscan] init-script dscand.sh: fix restart option

Message ID 1380800493-16670-1-git-send-email-jabk@prevas.dk
State Accepted
Delegated to: Esben Haabendal
Headers show

Commit Message

Jacob Kjaergaard Oct. 3, 2013, 11:41 a.m. UTC
From: Jacob Kjaergaard <jacob.kjaergaard@prevas.dk>

---
 src/dscand.sh.in |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Esben Haabendal Oct. 14, 2013, 2:16 p.m. UTC | #1
Merged to master, thanks.

/Esben
diff mbox

Patch

diff --git a/src/dscand.sh.in b/src/dscand.sh.in
index 4527f5e..829bfea 100755
--- a/src/dscand.sh.in
+++ b/src/dscand.sh.in
@@ -3,6 +3,7 @@  DAEMON=@BINDIR@/dscand
 NAME=dscand
 DESC="dscan daemon"
 ID="controller"
+PIDFILE=/var/run/dscand.pid
 
 test -f $DAEMON || exit 0
 
@@ -11,12 +12,12 @@  set -e
 case "$1" in
     start)
 	echo -n "starting $DESC: $NAME... "
-	start-stop-daemon -S -n $NAME -a $DAEMON -- --daemon --id="$ID"
+	start-stop-daemon -S -m -p $PIDFLE -a $DAEMON -- --daemon --id="$ID"
 	echo "done."
 	;;
     stop)
 	echo -n "stopping $DESC: $NAME... "
-	start-stop-daemon -K -n $NAME
+	start-stop-daemon -K -p $PIDFILE
 	echo "done."
 	;;
     restart)