Software /
code /
prosody
Diff
plugins/mod_posix.lua @ 2073:72784ce0c0e0
mod_posix: Switch config option to 'daemonize', fall back to 'no_daemonize' if not set, default behaviour remains the same... daemonize if mod_posix is loaded
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 08 Nov 2009 15:10:44 +0000 |
parent | 1712:45a81d6d8777 |
child | 2074:c59c8f3ec645 |
line wrap: on
line diff
--- a/plugins/mod_posix.lua Sun Nov 08 15:09:11 2009 +0000 +++ b/plugins/mod_posix.lua Sun Nov 08 15:10:44 2009 +0000 @@ -102,7 +102,12 @@ end require "core.loggingmanager".register_sink_type("syslog", syslog_sink_maker); -if not module:get_option("no_daemonize") then +local daemonize = module:get_option("daemonize"); +if daemonize == nil then + daemonize = not module:get_option("no_daemonize"); --COMPAT w/ 0.5 +end + +if daemonize then local function daemonize_server() local ok, ret = pposix.daemonize(); if not ok then