remove pidfile on stop. This makes "status" check on stop to return lsb compliant value

1.2
Jon Bonilla 15 years ago
parent 4ace854734
commit ecbb4a5141

@ -67,6 +67,10 @@ case "$1" in
echo -n "Stopping $DESC: $NAME"
start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
--exec $DAEMON
if [ "$?" -ne 0 ]; then
return $?
fi
rm -f $PIDFILE
log_end_msg $?
;;
restart|force-reload)
@ -74,10 +78,14 @@ case "$1" in
echo -n "Restarting $DESC: $NAME"
start-stop-daemon --oknodo --stop --quiet --pidfile \
$PIDFILE --exec $DAEMON
if [ "$?" -ne 0 ]; then
return $?
fi
rm -f $PIDFILE
sleep 1
start-stop-daemon --start --quiet --pidfile \
$PIDFILE --exec $DAEMON -- $OPTIONS
echo "."
log_end_msg $?
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?

Loading…
Cancel
Save