1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-03 01:39:35 +02:00

ext_mod: Print module status message after installation

This commit is contained in:
Badlop 2025-08-29 13:53:32 +02:00
parent 066e0a8101
commit fd8aba6d41

View file

@ -243,6 +243,7 @@ install(Package, Config) when is_binary(Package) ->
ok -> ok ->
code:add_pathsz([module_ebin_dir(Module)|module_deps_dirs(Module)]), code:add_pathsz([module_ebin_dir(Module)|module_deps_dirs(Module)]),
ejabberd_config_reload(Config), ejabberd_config_reload(Config),
maybe_print_module_status(Module),
copy_commit_json(Package, Attrs), copy_commit_json(Package, Attrs),
ModuleRuntime = get_runtime_module_name(Module), ModuleRuntime = get_runtime_module_name(Module),
case erlang:function_exported(ModuleRuntime, post_install, 0) of case erlang:function_exported(ModuleRuntime, post_install, 0) of
@ -263,6 +264,14 @@ ejabberd_config_reload(Config) when is_list(Config) ->
ejabberd_config_reload(undefined) -> ejabberd_config_reload(undefined) ->
ejabberd_config:reload(). ejabberd_config:reload().
maybe_print_module_status(Module) ->
case get_module_status_el(Module) of
[_, {xmlcdata, String}] ->
io:format("~ts~n", [String]);
_ ->
ok
end.
uninstall(Module) when is_atom(Module) -> uninstall(Module) when is_atom(Module) ->
uninstall(misc:atom_to_binary(Module)); uninstall(misc:atom_to_binary(Module));
uninstall(Package) when is_binary(Package) -> uninstall(Package) when is_binary(Package) ->