diff 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
line wrap: on
line diff
--- a/mod_reload_modules/mod_reload_modules.lua	Sat Nov 23 04:53:16 2019 +0100
+++ b/mod_reload_modules/mod_reload_modules.lua	Sun Dec 08 18:48:11 2019 +0000
@@ -28,6 +28,12 @@
 		module:log("debug", "Reloading %s", module_name);
 		mm.reload(module.host, module_name);
 	end
+
+	local global_modules = module:get_option_set("reload_global_modules", {});
+	for module_name in global_modules do
+		module:log("debug", "Global reload of mod_%s", module_name);
+		mm.reload("*", module_name);
+	end
 end