]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
ejabberd: wait until ejabberd is up and running
authorJohan Oudinet <johan.oudinet@gmail.com>
Wed, 15 Apr 2015 15:39:07 +0000 (17:39 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 19 Apr 2015 09:11:14 +0000 (11:11 +0200)
ejabberdctl start returns immediately even if ejabberd is not ready
yet. Add a call to ejabberdctl started just after to wait until the
status says ejabberd is up and running.

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/ejabberd/S50ejabberd

index a4710781db715e756e9327858430209b4c736743..ff38d9224dcff086f8b6dac9dbfc88339da4ed00 100644 (file)
@@ -25,6 +25,12 @@ case "$1" in
         mkrundir || exit 1
         echo -n "Starting ejabberd... "
         ctl start --spool "$SPOOLDIR"
+        # Wait until ejabberd is up and running.
+        if ctl started; then
+            echo "done"
+        else
+            echo "failed"
+        fi
         ;;
     stop)
         echo -n "Stopping ejabberd... "