mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
The command Update now returns meaningful message and exit-status (EJAB-1237)
This commit is contained in:
parent
8c4884d665
commit
cf4f0dbe6d
@ -106,7 +106,7 @@ commands() ->
|
||||
desc = "Update the given module, or use the keyword: all",
|
||||
module = ?MODULE, function = update,
|
||||
args = [{module, string}],
|
||||
result = {res, rescode}},
|
||||
result = {res, restuple}},
|
||||
|
||||
#ejabberd_commands{name = register, tags = [accounts],
|
||||
desc = "Register a user",
|
||||
@ -305,7 +305,10 @@ update(ModStr) ->
|
||||
|
||||
update_module(ModuleNameString) ->
|
||||
ModuleName = list_to_atom(ModuleNameString),
|
||||
ejabberd_update:update([ModuleName]).
|
||||
case ejabberd_update:update([ModuleName]) of
|
||||
{ok, Res} -> {ok, io_lib:format("Updated: ~p", [Res])};
|
||||
{error, Reason} -> {error, Reason}
|
||||
end.
|
||||
|
||||
%%%
|
||||
%%% Account management
|
||||
|
Loading…
Reference in New Issue
Block a user