Unfortunately, killproc utility silently ignores option -d when
a any user signal is given, so we have to wait ourselves for the
process to terminate.
$DAEMON $OPTIONS -t >/dev/null 2>&1
RETVAL=$?
if [ $RETVAL = 0 ]; then
- killproc -p ${pidfile} -d 10 $DAEMON -USR1
+ killproc -p ${pidfile} $DAEMON -USR1 >/dev/null 2>&1
RETVAL=$?
- rm -f ${pidfile}
+ if [ $RETVAL = 0 ]; then
+ i=0
+ p=`cat ${pidfile}`
+ while [ -d /proc/$p -a $i -lt 100 ]; do
+ i=`expr $i + 1`
+ usleep 50000
+ done
+ if [ -d /proc/$p ]; then
+ echo_failure
+ rc_status -v
+ RETVAL=1
+ else
+ rm -f ${pidfile}
+ fi
+ else
+ echo_failure
+ rc_status -v
+ fi
else
+ echo_failure
rc_status -v
echo $"not reloading due to configuration syntax error"
fi