<p dir="ltr">Ah, now I see the rm -f $PIDFILE haha. So yeah you're right. </p>
<div class="gmail_quote">On May 31, 2016 17:40, "Andreas Henriksson" <<a href="mailto:andreas@fatal.se">andreas@fatal.se</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Steven Roose.<br>
<br>
On Tue, May 31, 2016 at 02:15:10AM +0200, Steven Roose wrote:<br>
[...]<br>
> The daemon does not make it's own pidfile, so I added following relevant variables:<br>
> PIDFILE=/pidfile<br>
> START_ARGS=" --make-pidfile"<br>
> STOP_ARGS=" --remove-pidfile"<br>
[...]<br>
> --- a/debian/init-d-script<br>
> +++ b/debian/init-d-script<br>
> @@ -95,7 +95,7 @@ do_stop_cmd() {<br>
>       # sleep for some time.<br>
>       start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 \<br>
>           $STOP_ARGS \<br>
> -         --exec $DAEMON<br>
> +         ${PIDFILE:+--pidfile ${PIDFILE}} --name $NAME --exec $DAEMON<br>
>       [ "$?" = 2 ] && return 2<br>
>       # Many daemons don't delete their pidfiles when they exit.<br>
>       rm -f $PIDFILE<br>
[...]<br>
<br>
While I think your patch looks good please note that there's no<br>
point in using STOP_ARGS=" --remove-pidfile" given the last quoted<br>
line above which will unconditionally remove any pidfile.<br>
<br>
The workaround for your issue is thus very simple. Just drop<br>
STOP_ARGS=" --remove-pidfile"<br>
<br>
Hope this helps.<br>
<br>
Regards,<br>
Andreas Henriksson<br>
</blockquote></div>