Comparison

plugins/mod_posix.lua @ 6054:7a5ddbaf758d

Merge 0.9->0.10
author Matthew Wild <mwild1@gmail.com>
date Wed, 02 Apr 2014 17:41:38 +0100
parent 6002:3547f315a1f5
child 6061:1056ea08970f
comparison
equal deleted inserted replaced
6053:2f93a04564b2 6054:7a5ddbaf758d
1 -- Prosody IM 1 -- Prosody IM
2 -- Copyright (C) 2008-2010 Matthew Wild 2 -- Copyright (C) 2008-2010 Matthew Wild
3 -- Copyright (C) 2008-2010 Waqas Hussain 3 -- Copyright (C) 2008-2010 Waqas Hussain
4 -- 4 --
5 -- This project is MIT/X11 licensed. Please see the 5 -- This project is MIT/X11 licensed. Please see the
6 -- COPYING file in the source package for more information. 6 -- COPYING file in the source package for more information.
7 -- 7 --
8 8
9 9
126 end 126 end
127 end; 127 end;
128 end 128 end
129 require "core.loggingmanager".register_sink_type("syslog", syslog_sink_maker); 129 require "core.loggingmanager".register_sink_type("syslog", syslog_sink_maker);
130 130
131 local daemonize = module:get_option("daemonize"); 131 local daemonize = module:get_option("daemonize", prosody.installed);
132 if daemonize == nil then 132 if daemonize == nil then
133 local no_daemonize = module:get_option("no_daemonize"); --COMPAT w/ 0.5 133 local no_daemonize = module:get_option("no_daemonize"); --COMPAT w/ 0.5
134 daemonize = not no_daemonize; 134 daemonize = not no_daemonize;
135 if no_daemonize ~= nil then 135 if no_daemonize ~= nil then
136 module:log("warn", "The 'no_daemonize' option is now replaced by 'daemonize'"); 136 module:log("warn", "The 'no_daemonize' option is now replaced by 'daemonize'");
181 signal.signal("SIGHUP", function () 181 signal.signal("SIGHUP", function ()
182 module:log("info", "Received SIGHUP"); 182 module:log("info", "Received SIGHUP");
183 prosody.reload_config(); 183 prosody.reload_config();
184 prosody.reopen_logfiles(); 184 prosody.reopen_logfiles();
185 end); 185 end);
186 186
187 signal.signal("SIGINT", function () 187 signal.signal("SIGINT", function ()
188 module:log("info", "Received SIGINT"); 188 module:log("info", "Received SIGINT");
189 prosody.unlock_globals(); 189 prosody.unlock_globals();
190 prosody.shutdown("Received SIGINT"); 190 prosody.shutdown("Received SIGINT");
191 prosody.lock_globals(); 191 prosody.lock_globals();