From b16b585ed1c389497980d59aae598fa7bccd28af Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 8 May 2014 09:56:44 +0200 Subject: [PATCH] - back to old stopping method but print errors on failure --- ejabberd.init | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ejabberd.init b/ejabberd.init index 447e7d5..f78fb6c 100644 --- a/ejabberd.init +++ b/ejabberd.init @@ -38,14 +38,20 @@ start() { stop() { # Stop daemons. if [ -f /var/lock/subsys/ejabberd ]; then - msg_stopping ejabberd - daemon /usr/sbin/ejabberdctl stop + msg_stopping ejabberd ; busy + out=$(/usr/sbin/ejabberdctl stop 2>&1) RETVAL=$? if [ $RETVAL -eq 0 ]; then - msg_starting "ejabberd stop confirmation" - daemon /usr/sbin/ejabberdctl stopped + out2=$(/usr/sbin/ejabberdctl stopped 2>&1) RETVAL=$? fi + if [ $RETVAL -eq 0 ]; then + ok + else + fail + [ -n "$out" ] && echo $out + [ -n "$out2" ] && echo $out2 + fi rm -f /var/lock/subsys/ejabberd else msg_not_running ejabberd -- 2.44.0