diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-02-22 19:46:47 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-02-22 19:46:47 +0300 |
commit | 3c4057ff553928d4e4ab40e410dbc6a478dd8206 (patch) | |
tree | a0272f84a1221db928cfd4c9f44d9bed6e196bc8 /src/ejabberd_config.erl | |
parent | Make sure all hooks are called with proper host (diff) |
Reload modules when reloading configuration file
Diffstat (limited to 'src/ejabberd_config.erl')
-rw-r--r-- | src/ejabberd_config.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ejabberd_config.erl b/src/ejabberd_config.erl index 89cd67ca..ff0f7b3e 100644 --- a/src/ejabberd_config.erl +++ b/src/ejabberd_config.erl @@ -138,7 +138,7 @@ get_ejabberd_config_path() -> -spec get_env_config() -> {ok, string()} | undefined. get_env_config() -> %% First case: the filename can be specified with: erl -config "/path/to/ejabberd.yml". - case application:get_env(config) of + case application:get_env(ejabberd, config) of R = {ok, _Path} -> R; undefined -> %% Second case for embbeding ejabberd in another app, for example for Elixir: @@ -194,7 +194,8 @@ load_file(File) -> reload_file() -> Config = get_ejabberd_config_path(), - load_file(Config). + load_file(Config), + ejabberd_hooks:run(config_reloaded, []). -spec convert_to_yaml(file:filename()) -> ok | {error, any()}. |