Are you sure? If that is the case, that what is --remove-pidfile for? I thought to understand from the docs that --pidfile is only used to identify the process, but thst start-stop-daemon considers pidfile handling to he done by the daemon.
And that --make-pidfile and --remove-pidfile are to make start-stop-daemon do this for you. However I have little experience, will test asap dropping the argument. On May 31, 2016 17:40, "Andreas Henriksson" <andr...@fatal.se> wrote: > Hello Steven Roose. > > On Tue, May 31, 2016 at 02:15:10AM +0200, Steven Roose wrote: > [...] > > The daemon does not make it's own pidfile, so I added following relevant > variables: > > PIDFILE=/pidfile > > START_ARGS=" --make-pidfile" > > STOP_ARGS=" --remove-pidfile" > [...] > > --- a/debian/init-d-script > > +++ b/debian/init-d-script > > @@ -95,7 +95,7 @@ do_stop_cmd() { > > # sleep for some time. > > start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 \ > > $STOP_ARGS \ > > - --exec $DAEMON > > + ${PIDFILE:+--pidfile ${PIDFILE}} --name $NAME --exec $DAEMON > > [ "$?" = 2 ] && return 2 > > # Many daemons don't delete their pidfiles when they exit. > > rm -f $PIDFILE > [...] > > While I think your patch looks good please note that there's no > point in using STOP_ARGS=" --remove-pidfile" given the last quoted > line above which will unconditionally remove any pidfile. > > The workaround for your issue is thus very simple. Just drop > STOP_ARGS=" --remove-pidfile" > > Hope this helps. > > Regards, > Andreas Henriksson >