From fb1e02ed352242b9171730d6f6eabafd52063b82 Mon Sep 17 00:00:00 2001 From: Johan Oudinet Date: Wed, 15 Apr 2015 17:39:07 +0200 Subject: [PATCH] ejabberd: wait until ejabberd is up and running 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 Signed-off-by: Thomas Petazzoni --- package/ejabberd/S50ejabberd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/ejabberd/S50ejabberd b/package/ejabberd/S50ejabberd index a4710781db..ff38d9224d 100644 --- a/package/ejabberd/S50ejabberd +++ b/package/ejabberd/S50ejabberd @@ -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... " -- 2.30.2