# HG changeset patch # User Kim Alvefur # Date 1484700770 -3600 # Node ID 366fadb5c6e540808b9c2e5c0b35e9a7aa110e54 # Parent c563f4d643020b63ba359be637e62c1b3f4d8c29 mod_persisthosts: Fire an event to allow other modules a chance to write to the new config file diff -r c563f4d64302 -r 366fadb5c6e5 mod_persisthosts/mod_persisthosts.lua --- a/mod_persisthosts/mod_persisthosts.lua Wed Jan 18 01:38:17 2017 +0100 +++ b/mod_persisthosts/mod_persisthosts.lua Wed Jan 18 01:52:50 2017 +0100 @@ -18,6 +18,7 @@ local fh, err = io.open(path, "w"); if fh then fh:write(("VirtualHost%q\n"):format(host)); + module:fire_event("host-persisted", { host = host, file = fh }); fh:close(); module:log("info", "Config file for host '%s' created", host); else