mod_posix: Updated to use the new events API.

Sat, 16 Oct 2010 07:45:12 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sat, 16 Oct 2010 07:45:12 +0500
changeset 3537
7bbb19804d82
parent 3536
fab65a4692ac
child 3538
3ea38f44420c

mod_posix: Updated to use the new events API.

plugins/mod_posix.lua file | annotate | diff | comparison | revisions
--- 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

mercurial