mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
The command Update now returns meaningful message and exit-status (EJAB-1237)
This commit is contained in:
parent
f36da63a3a
commit
027418aba5
@ -106,7 +106,7 @@ commands() ->
|
|||||||
desc = "Update the given module, or use the keyword: all",
|
desc = "Update the given module, or use the keyword: all",
|
||||||
module = ?MODULE, function = update,
|
module = ?MODULE, function = update,
|
||||||
args = [{module, string}],
|
args = [{module, string}],
|
||||||
result = {res, rescode}},
|
result = {res, restuple}},
|
||||||
|
|
||||||
#ejabberd_commands{name = register, tags = [accounts],
|
#ejabberd_commands{name = register, tags = [accounts],
|
||||||
desc = "Register a user",
|
desc = "Register a user",
|
||||||
@ -301,7 +301,10 @@ update(ModStr) ->
|
|||||||
|
|
||||||
update_module(ModuleNameString) ->
|
update_module(ModuleNameString) ->
|
||||||
ModuleName = list_to_atom(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
|
%%% Account management
|
||||||
|
Loading…
Reference in New Issue
Block a user