From: Sven Hoexter Date: Mon, 17 Oct 2011 13:29:17 +0000 (+0200) Subject: Use the RH success funktion and LSB log_failure_msg in the d_stop funktion. X-Git-Tag: 1.2.0-3~2 X-Git-Url: http://git.sven.stormbind.net/?p=sven%2Fmpt-status.git;a=commitdiff_plain;h=e1b444e6076b221fa51ee4daa0ad783ba4a2cc3e Use the RH success funktion and LSB log_failure_msg in the d_stop funktion. --- 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 }