Hello,
I think that killproc must not always remove the pidfile because if signal is
SIGHUP the daemon is still alive juste reload the config in most of the case
and it delete the pid file ..
I think is not a good idea
experience probleme in nagios for exemple when you usr /etc/init.d/nagios
reload
The init script call :
killproc -p $THEPIDFILE $DAEMON 1
which run
/sbin/start-stop-daemon --stop --pidfile /var/log/nagios/nagios.lock --signal
1 --quiet
Well , return code of start-stop-daemon is 0 but the process is still alive ..
Maybe change like that:
--------------------------
if [ "$status" = 1 ]; then
[ -n "$sig" ] && return 0
return 3 # program is not running
fi
rm -f "$pidfile"
return 0
}
--------------------------
--------------------------
if [ "$status" = 1 ]; then
[ -n "$sig" ] && return 0
return 3 # program is not running
else
# test SIGHUP
[ "$status" = 0 ] && [ -n "$sig" ] && [ "$sig" = 1 ] && return 0
fi
rm -f "$pidfile"
return 0
}
--------------------------
Philippe
apt-cache policy lsb-base
lsb-base:
Installé : 3.1-23
Candidat : 3.1-23
Table de version :
*** 3.1-23 0
400 ftp://ftp.fr.debian.org testing/main Package