X-Git-Url: https://git.sven.stormbind.net/?p=sven%2Fmpt-status.git;a=blobdiff_plain;f=mpt-status.init;fp=mpt-status.init;h=c6d9f4844d3e2f4fa93a814b91d8b6aee420c525;hp=c30c4ac08623c9dd9e43c2bac5434616e47f9452;hb=e1b444e6076b221fa51ee4daa0ad783ba4a2cc3e;hpb=5f91f5654b9b29cc4a18e031380e1eff903ea68f diff --git a/mpt-status.init b/mpt-status.init index c30c4ac..c6d9f48 100644 --- a/mpt-status.init +++ b/mpt-status.init @@ -158,10 +158,16 @@ d_stop() { if [ -f $PIDFILE ] ; then killproc $SCRIPTNAME RETVAL=$? - [ $RETVAL -eq 0 ] && rm -f $PIDFILE - return $RETVAL + if [ $RETVAL -eq 0 ] ; then + success "$NAME stopped" + rm -f $PIDFILE + return 0 + else + log_failure_msg "$NAME failed to stop" + return 1 + fi else - log_warning_msg "Daemon is already stopped." + log_warning_msg "$NAME is already stopped." return 0 fi }