]> granicus.if.org Git - ejabberd/commitdiff
Ensure config snippet is loaded at module installation (EJAB-1741)
authorChristophe Romain <christophe.romain@process-one.net>
Fri, 24 Jul 2015 13:09:57 +0000 (15:09 +0200)
committerChristophe Romain <christophe.romain@process-one.net>
Fri, 24 Jul 2015 13:09:57 +0000 (15:09 +0200)
src/ext_mod.erl

index 070fdf9d3d46a10de6eb928cafa27ced81c43d64..002c5dd91616aa7c05d8cab9d1b807c611750b59 100644 (file)
@@ -164,6 +164,7 @@ install(Package) when is_binary(Package) ->
             case compile_and_install(Module, Attrs) of
                 ok ->
                     code:add_patha(module_ebin_dir(Module)),
+                    ejabberd_config:reload_file(),
                     ok;
                 Error ->
                     delete_path(module_lib_dir(Module)),
@@ -182,7 +183,8 @@ uninstall(Package) when is_binary(Package) ->
             code:purge(Module),
             code:delete(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 ->
             {error, not_installed}
     end.