102 end |
102 end |
103 require "core.loggingmanager".register_sink_type("syslog", syslog_sink_maker); |
103 require "core.loggingmanager".register_sink_type("syslog", syslog_sink_maker); |
104 |
104 |
105 local daemonize = module:get_option("daemonize"); |
105 local daemonize = module:get_option("daemonize"); |
106 if daemonize == nil then |
106 if daemonize == nil then |
107 daemonize = not module:get_option("no_daemonize"); --COMPAT w/ 0.5 |
107 local no_daemonize = module:get_option("no_daemonize"); --COMPAT w/ 0.5 |
|
108 daemonize = not no_daemonize; |
|
109 if no_daemonize ~= nil then |
|
110 module:log("warn", "The 'no_daemonize' option is now replaced by 'daemonize'"); |
|
111 module:log("warn", "Update your config from 'no_daemonize = %s' to 'daemonize = %s'", tostring(no_daemonize), tostring(daemonize)); |
|
112 end |
108 end |
113 end |
109 |
114 |
110 if daemonize then |
115 if daemonize then |
111 local function daemonize_server() |
116 local function daemonize_server() |
112 local ok, ret = pposix.daemonize(); |
117 local ok, ret = pposix.daemonize(); |