26
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-28 17:38:54 +01:00

Ensure config snippet is loaded at module installation (EJAB-1741)

This commit is contained in:
Christophe Romain 2015-07-24 15:09:57 +02:00
parent 32fc586c08
commit e211bf7131

View File

@ -164,6 +164,7 @@ install(Package) when is_binary(Package) ->
case compile_and_install(Module, Attrs) of case compile_and_install(Module, Attrs) of
ok -> ok ->
code:add_patha(module_ebin_dir(Module)), code:add_patha(module_ebin_dir(Module)),
ejabberd_config:reload_file(),
ok; ok;
Error -> Error ->
delete_path(module_lib_dir(Module)), delete_path(module_lib_dir(Module)),
@ -182,7 +183,8 @@ uninstall(Package) when is_binary(Package) ->
code:purge(Module), code:purge(Module),
code:delete(Module), code:delete(Module),
code:del_path(module_ebin_dir(Module)), code:del_path(module_ebin_dir(Module)),
delete_path(module_lib_dir(Module)); delete_path(module_lib_dir(Module)),
ejabberd_config:reload_file();
false -> false ->
{error, not_installed} {error, not_installed}
end. end.