comparison mod_reload_modules/mod_reload_modules.lua @ 3759:57eb248f6dd3

mod_reload_modules: Accept a list of global modules to reload
author Matthew Wild <mwild1@gmail.com>
date Sun, 08 Dec 2019 18:48:11 +0000
parents fc08d841a309
children 3b8f4f3b1718
comparison
equal deleted inserted replaced
3758:900ea02ab00b 3759:57eb248f6dd3
26 26
27 for module_name in set.intersection(modules,configured_modules) do 27 for module_name in set.intersection(modules,configured_modules) do
28 module:log("debug", "Reloading %s", module_name); 28 module:log("debug", "Reloading %s", module_name);
29 mm.reload(module.host, module_name); 29 mm.reload(module.host, module_name);
30 end 30 end
31
32 local global_modules = module:get_option_set("reload_global_modules", {});
33 for module_name in global_modules do
34 module:log("debug", "Global reload of mod_%s", module_name);
35 mm.reload("*", module_name);
36 end
31 end 37 end
32 38
33 39
34 if module.hook_global then 40 if module.hook_global then
35 module:hook_global("config-reloaded", reload_all); 41 module:hook_global("config-reloaded", reload_all);