[Buildroot] [PATCH 3/3] ejabberd: wait until ejabberd is up and running
Johan Oudinet
johan.oudinet at gmail.com
Wed Apr 15 15:39:07 UTC 2015
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 at gmail.com>
---
package/ejabberd/S50ejabberd | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/ejabberd/S50ejabberd b/package/ejabberd/S50ejabberd
index a471078..ff38d92 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.1.0
More information about the buildroot
mailing list