aboutsummaryrefslogtreecommitdiff
path: root/package/ejabberd/S50ejabberd
diff options
context:
space:
mode:
authorGravatar Johan Oudinet <johan.oudinet@gmail.com>2015-04-15 17:39:07 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-04-19 11:11:14 +0200
commitfb1e02ed352242b9171730d6f6eabafd52063b82 (patch)
treed0e2b8dea9de033edea46a71dcc34f40010d2f4e /package/ejabberd/S50ejabberd
parentf266a36d62b5ac3b418ab15675c72fc172ab24fe (diff)
downloadbuildroot-fb1e02ed352242b9171730d6f6eabafd52063b82.tar.gz
buildroot-fb1e02ed352242b9171730d6f6eabafd52063b82.tar.bz2
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 <johan.oudinet@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/ejabberd/S50ejabberd')
-rw-r--r--package/ejabberd/S50ejabberd6
1 files changed, 6 insertions, 0 deletions
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... "