# HG changeset patch # User Louis Opter # Date 1446949459 28800 # Node ID 06f06306e3f459fd875202e75eb24020a814e316 # Parent a1d629cc9a2166ba5654a7138f2a3ef18c49f018 Fix the init.d script - Fix DAEMON path; - Use the --pidfile option landing with 1.1.0 diff -r a1d629cc9a21 -r 06f06306e3f4 debian/init.d --- a/debian/init.d Sat Nov 07 10:24:58 2015 +0000 +++ b/debian/init.d Sat Nov 07 18:24:19 2015 -0800 @@ -17,7 +17,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="lightsd" NAME=lightsd -DAEMON=/usr/sbin/lightsd +DAEMON=/usr/bin/lightsd PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME @@ -31,6 +31,7 @@ --daemonize --verbosity warning --user lightsd + --pidfile $PIDFILE --socket /var/run/lightsd/socket --command-pipe /var/run/lightsd/pipe $DAEMON_OPTS @@ -52,8 +53,7 @@ # 2 if daemon could not be started start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ || return 1 - start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --exec $DAEMON -- \ - $DAEMON_ARGS \ + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS \ || return 2 } @@ -64,7 +64,7 @@ # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --remove-pidfile --name $NAME + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME RETVAL="$?" [ "$RETVAL" = 2 ] && return 2 # Wait for children to finish too if this is a daemon that forks