mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Fix support to restart module with live options in WebAdmin
This commit is contained in:
parent
7074a39ff3
commit
c41c5b2185
@ -2381,10 +2381,13 @@ node_modules_parse_query(Host, Node, Modules, Query) ->
|
||||
{ok, Tokens, _} =
|
||||
erl_scan:string(binary_to_list(<<SOpts/binary, ".">>)),
|
||||
{ok, Opts} = erl_parse:parse_term(Tokens),
|
||||
NewMods = lists:keystore(Module, 1, ejabberd_config:get_option(modules), {Module, Opts}),
|
||||
ejabberd_cluster:call(Node, gen_mod, stop_module,
|
||||
[Host, Module]),
|
||||
ejabberd_cluster:call(Node, ejabberd_config, add_option,
|
||||
[modules, NewMods]),
|
||||
ejabberd_cluster:call(Node, gen_mod, start_module,
|
||||
[Host, Module, Opts]),
|
||||
[Host, Module]),
|
||||
throw(submitted);
|
||||
_ ->
|
||||
case lists:keysearch(<<"stop", SModule/binary>>,
|
||||
|
Loading…
Reference in New Issue
Block a user