Hi Antoine, > What do you have in DAEMON_ARGS then? DAEMON_ARGS="--fork --config /data/applications/grobbebol/grobbebol.cfg"
> One thing that strikes me as a possibility is that I probably don't use > the init.d script at all here. I am running willie in a Jessie system > running systemd as PID 1. Furthermore, i use a slight modification of > the startup script: That would certainly explain it. Looking at the service file, it doesn't use willie --quit at all, instead relying on systemd to keep track of the pid and send signals. I've attached the patch I'm running with now. This makes stopping and restarting work most of the time. Still unsolved is that if stopping takes a long time, or never completes, --kill is never called and the subsequent start happens immediately and fails. Fixing the latter would require --quit to actually wait (with a timeout) for willie to quit, or it would require redoing the pidfile logic and the wait inside the initscript, I guess. I don't have time to implement either, unfortunately. Gr. Matthijs
--- etc/init.d/willie 2015-03-19 03:24:08.000000000 +0100
+++ /etc/init.d/willie 2015-04-15 16:40:34.970737451 +0200
@@ -76,11 +76,11 @@
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
- su -s /bin/sh $NAME -c "$NAME --quit"
+ su -s /bin/sh $NAME -c "$NAME --quit $DAEMON_ARGS"
rm -f $PIDFILE
RETVAL="$?"
[ "$RETVAL" = 0 ] && return 0
- su -s /bin/sh $NAME -c "$NAME --kill"
+ su -s /bin/sh $NAME -c "$NAME --kill $DAEMON_ARGS"
return "$?"
}
signature.asc
Description: Digital signature

