From e1b444e6076b221fa51ee4daa0ad783ba4a2cc3e Mon Sep 17 00:00:00 2001 From: Sven Hoexter Date: Mon, 17 Oct 2011 15:29:17 +0200 Subject: [PATCH] Use the RH success funktion and LSB log_failure_msg in the d_stop funktion. --- mpt-status.init | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 } -- 2.39.2