# HG changeset patch # User heiko # Date 1406709766 -7200 # Node ID bd4aaf436891ea18b71fe3c9a42b2d9ac7b84726 # Parent c5127a2c4f81b6d5e09ee7301f8088e6e612245e fixed start/stop pidof(8) scans the first field of /proc//cmdline. tele-watch sets $0 to 'tele-watch ', this in turn sets argv[0], the /proc//cmdline. The name we need to look for with pidof is 'tele-watch '. diff -r c5127a2c4f81 -r bd4aaf436891 init.d.in --- a/init.d.in Wed Jul 30 10:34:23 2014 +0200 +++ b/init.d.in Wed Jul 30 10:42:46 2014 +0200 @@ -49,7 +49,7 @@ # 0 if daemon has been started # 0 if daemon was already running # 2 if daemon could not be started - PID=$(pidof $NAME) && return 0 + PID=$(pidof "$NAME $WATCHPOINTS") && return 0 if [ ! $PID ]; then $DAEMON "$WATCHPOINTS" || return 2 @@ -67,7 +67,7 @@ # 0 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred - PID=$(pidof $NAME) || return 0 + PID=$(pidof "$NAME $WATCHPOINTS") || return 0 $DAEMON --kill || return 2 return 0