Commit fb1e02ed authored by Johan Oudinet's avatar Johan Oudinet Committed by Thomas Petazzoni
Browse files

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: default avatarJohan Oudinet <johan.oudinet@gmail.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent f266a36d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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... "