This mitigates the risk of having 2 daemons running simultaneously
during a short period, on restart.
The debian package's initscript does the same thing, using the same
timeout value.
COLLECTDMONPIDDIR="/var/run"
COLLECTDMONPID="$COLLECTDMONPIDDIR/collectdmon.pid"
+MAXWAIT=30
+
if [ -r /etc/sysconfig/$service ]; then
. /etc/sysconfig/$service
fi
}
stop () {
echo -n $"Stopping collectd: "
- killproc -p $COLLECTDMONPID $prog
+ killproc -p $COLLECTDMONPID -d $MAXWAIT $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$service