100 end |
100 end |
101 end; |
101 end; |
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 if not module:get_option("no_daemonize") then |
105 local daemonize = module:get_option("daemonize"); |
|
106 if daemonize == nil then |
|
107 daemonize = not module:get_option("no_daemonize"); --COMPAT w/ 0.5 |
|
108 end |
|
109 |
|
110 if daemonize then |
106 local function daemonize_server() |
111 local function daemonize_server() |
107 local ok, ret = pposix.daemonize(); |
112 local ok, ret = pposix.daemonize(); |
108 if not ok then |
113 if not ok then |
109 module:log("error", "Failed to daemonize: %s", ret); |
114 module:log("error", "Failed to daemonize: %s", ret); |
110 elseif ret and ret > 0 then |
115 elseif ret and ret > 0 then |