diff options
author | Badlop <badlop@process-one.net> | 2008-10-24 22:11:42 +0000 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2008-10-24 22:11:42 +0000 |
commit | 9d521c9dd03cf6442272aff499fe9600e2309358 (patch) | |
tree | 3bffcd83e1f5414ca55ed75e2230493c7fcf11f1 /src | |
parent | * src/ejabberd_app.erl: Open ejabberd.log sooner, so errors during (diff) |
* src/ejabberd_ctl.erl: If ejabberd didn't start correctly:
'ejabberdctl status' suggests to look in log files; any other
ejabberdctl command shows 'status'.
SVN Revision: 1668
Diffstat (limited to 'src')
-rw-r--r-- | src/ejabberd_ctl.erl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ejabberd_ctl.erl b/src/ejabberd_ctl.erl index 362d12c9..32897418 100644 --- a/src/ejabberd_ctl.erl +++ b/src/ejabberd_ctl.erl @@ -132,7 +132,10 @@ process(["status"]) -> [node(), InternalStatus, ProvidedStatus]), case lists:keysearch(ejabberd, 1, application:which_applications()) of false -> - ?PRINT("ejabberd is not running in that node~n", []), + EjabberdLogPath = ejabberd_app:get_log_path(), + ?PRINT("ejabberd is not running in that node~n" + "Check for error messages: ~s~n" + "or other files in that directory.~n", [EjabberdLogPath]), ?STATUS_ERROR; {value, {_, _, Version}} -> ?PRINT("ejabberd ~s is running in that node~n", [Version]), @@ -237,7 +240,12 @@ try_run_ctp(Args) -> catch exit:Why -> print_usage(), - {io_lib:format("Error in ejabberd ctl process: ~p", [Why]), ?STATUS_USAGE} + {io_lib:format("Error in ejabberd ctl process: ~p", [Why]), ?STATUS_USAGE}; + Error:Why -> + %% In this case probably ejabberd is not started, so let's show Status + process(["status"]), + ?PRINT("~n", []), + {io_lib:format("Error in ejabberd ctl process: '~p' ~p", [Error, Why]), ?STATUS_USAGE} end. %% @spec (Args::[string()]) -> |