commit a778ff6ace9bd8175c2f263817492b937b2f63b9
Author: Arkadiusz Miƛkiewicz <[email protected]>
Date:   Tue May 6 23:27:34 2014 +0200

    - rel 3; run all command via daemon(), so limits gets applied correctly and 
we don't hit: File operation error: emfile.

 ejabberd.init | 25 ++++++++-----------------
 ejabberd.spec |  2 +-
 2 files changed, 9 insertions(+), 18 deletions(-)
---
diff --git a/ejabberd.spec b/ejabberd.spec
index 0a7454a..bec73f5 100644
--- a/ejabberd.spec
+++ b/ejabberd.spec
@@ -8,7 +8,7 @@ Summary:        Fault-tolerant distributed Jabber/XMPP server
 Summary(pl.UTF-8):     Odporny na awarie rozproszony serwer Jabbera/XMPP
 Name:          ejabberd
 Version:       13.12
-Release:       2
+Release:       3
 License:       GPL
 Group:         Applications/Communications
 Source0:       
http://www.process-one.net/downloads/ejabberd/%{version}/%{name}-%{version}.tgz
diff --git a/ejabberd.init b/ejabberd.init
index 4b655d1..17514f7 100644
--- a/ejabberd.init
+++ b/ejabberd.init
@@ -21,19 +21,14 @@ export EJABBERD_DOC_PATH EJABBERD_PID_PATH
 start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/ejabberd ]; then
-               msg_starting ejabberd ; busy
-               /usr/sbin/ejabberdctl start
+               msg_starting ejabberd
+               daemon /usr/sbin/ejabberdctl start
                RETVAL=$?
                if [ $RETVAL -eq 0 ]; then
-                       /usr/sbin/ejabberdctl started
+                       msg_starting "ejabberd start confirmation"
+                       daemon /usr/sbin/ejabberdctl started
                        RETVAL=$?
                fi
-               if [ $RETVAL -eq 0 ]; then
-                       touch /var/lock/subsys/ejabberd
-                       ok
-               else
-                       fail
-               fi
        else
                msg_already_running ejabberd
        fi
@@ -42,18 +37,14 @@ start() {
 stop() {
        # Stop daemons.
        if [ -f /var/lock/subsys/ejabberd ]; then
-               msg_stopping ejabberd ; busy
-               /usr/sbin/ejabberdctl stop 2>/dev/null
+               msg_stopping ejabberd
+               daemon /usr/sbin/ejabberdctl stop
                RETVAL=$?
                if [ $RETVAL -eq 0 ]; then
-                       /usr/sbin/ejabberdctl stopped 2>/dev/null
+                       msg_starting "ejabberd stop confirmation"
+                       daemon /usr/sbin/ejabberdctl stopped
                        RETVAL=$?
                fi
-               if [ $RETVAL -eq 0 ]; then
-                       ok
-               else
-                       fail
-               fi
                rm -f /var/lock/subsys/ejabberd
        else
                msg_not_running ejabberd
================================================================

---- gitweb:

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

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

Reply via email to