mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Improve reload_config admin command
This commit is contained in:
parent
7d68112265
commit
a3ea6e7723
@ -174,7 +174,7 @@ get_commands_spec() ->
|
|||||||
args = [],
|
args = [],
|
||||||
result = {vhosts, {list, {vhost, string}}}},
|
result = {vhosts, {list, {vhost, string}}}},
|
||||||
#ejabberd_commands{name = reload_config, tags = [server],
|
#ejabberd_commands{name = reload_config, tags = [server],
|
||||||
desc = "Reload config file in memory (only affects ACL and Access)",
|
desc = "Reload config file in memory",
|
||||||
module = ?MODULE, function = reload_config,
|
module = ?MODULE, function = reload_config,
|
||||||
args = [],
|
args = [],
|
||||||
result = {res, rescode}},
|
result = {res, rescode}},
|
||||||
@ -473,8 +473,8 @@ registered_vhosts() ->
|
|||||||
|
|
||||||
reload_config() ->
|
reload_config() ->
|
||||||
ejabberd_config:reload_file(),
|
ejabberd_config:reload_file(),
|
||||||
acl:load_from_config(),
|
%% TODO: Move this to ejabberd_access_permissions.erl and put on hook
|
||||||
shaper:load_from_config(),
|
%% This requires ejabberd_access_permissions to start after ejabberd_hooks
|
||||||
ejabberd_access_permissions:invalidate().
|
ejabberd_access_permissions:invalidate().
|
||||||
|
|
||||||
%%%
|
%%%
|
||||||
|
@ -55,6 +55,7 @@ start() ->
|
|||||||
{local_content, true},
|
{local_content, true},
|
||||||
{attributes, record_info(fields, shaper)}]),
|
{attributes, record_info(fields, shaper)}]),
|
||||||
mnesia:add_table_copy(shaper, node(), ram_copies),
|
mnesia:add_table_copy(shaper, node(), ram_copies),
|
||||||
|
ejabberd_hooks:add(config_reloaded, ?MODULE, load_from_config, 20),
|
||||||
load_from_config(),
|
load_from_config(),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user