# HG changeset patch # User Waqas Hussain # Date 1287197112 -18000 # Node ID 7bbb19804d827bd17ba449a36e7f2e645409088b # Parent fab65a4692acd266fc19976d53063ebcf2af8251 mod_posix: Updated to use the new events API. diff -r fab65a4692ac -r 7bbb19804d82 plugins/mod_posix.lua --- a/plugins/mod_posix.lua Sat Oct 16 07:31:50 2010 +0500 +++ b/plugins/mod_posix.lua Sat Oct 16 07:45:12 2010 +0500 @@ -30,7 +30,7 @@ pposix.umask(umask); -- Allow switching away from root, some people like strange ports. -module:add_event_hook("server-started", function () +module:hook("server-started", function () local uid = module:get_option("setuid"); local gid = module:get_option("setgid"); if gid then @@ -158,7 +158,7 @@ write_pidfile(); end -module:add_event_hook("server-stopped", remove_pidfile); +module:hook("server-stopped", remove_pidfile); -- Set signal handlers if signal.signal then