commit b16b585ed1c389497980d59aae598fa7bccd28af
Author: Arkadiusz Miƛkiewicz <[email protected]>
Date:   Thu May 8 09:56:44 2014 +0200

    - 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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ejabberd.git/commitdiff/b16b585ed1c389497980d59aae598fa7bccd28af

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to