diff --git a/ChangeLog b/ChangeLog index bd075567b..c72ab58cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-04-27 Mickael Remond + + * src/ejabberd_ctl.erl: The status now only returns "started" if + ejabberd is started and ready to accept requests. + 2006-04-24 Alexey Shchepin * doc/guide.tex: Added a documentation for max_stanza_size option diff --git a/src/ejabberd_ctl.erl b/src/ejabberd_ctl.erl index 63825e916..d8905c2e7 100644 --- a/src/ejabberd_ctl.erl +++ b/src/ejabberd_ctl.erl @@ -45,8 +45,15 @@ init() -> process(["status"]) -> {InternalStatus, ProvidedStatus} = init:get_status(), io:format("Node ~p is ~p. Status: ~p~n", - [node(), InternalStatus, ProvidedStatus]), - ?STATUS_SUCCESS; + [node(), InternalStatus, ProvidedStatus]), + case lists:keysearch(ejabberd, 1, application:which_applications()) of + false -> + io:format("ejabberd is not running~n", []), + ?STATUS_ERROR; + {value,_Version} -> + io:format("ejabberd is running~n", []), + ?STATUS_SUCCESS + end; process(["stop"]) -> init:stop(),