diff options
author | Mickaël Rémond <mickael.remond@process-one.net> | 2006-04-26 22:28:05 +0000 |
---|---|---|
committer | Mickaël Rémond <mickael.remond@process-one.net> | 2006-04-26 22:28:05 +0000 |
commit | bd4c18516cddc4a5d3a5723b76e7927cd347e9b4 (patch) | |
tree | 2abcb88808cade4830761812a93e99507181b66f /src | |
parent | * Fixed notes for version 1.1.0 release. (diff) |
* src/ejabberd_ctl.erl: The status now only returns "started" if
ejabberd is started and ready to accept requests.
SVN Revision: 554
Diffstat (limited to 'src')
-rw-r--r-- | src/ejabberd_ctl.erl | 11 |
1 files changed, 9 insertions, 2 deletions
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(), |