plugins/mod_posix.lua
branch0.11
changeset 10602 5cf481bee678
parent 9767 982529dd0bed
child 10603 4f655918fef1
--- a/plugins/mod_posix.lua	Sun Jan 19 15:27:16 2020 +0000
+++ b/plugins/mod_posix.lua	Sun Jan 19 15:28:09 2020 +0000
@@ -126,7 +126,12 @@
 end
 require "core.loggingmanager".register_sink_type("syslog", syslog_sink_maker);
 
-local daemonize = module:get_option("daemonize", prosody.installed);
+local daemonize = prosody.opts.daemonize;
+
+if daemonize == nil then
+	-- Fall back to config file if not specified on command-line
+	daemonize = module:get_option("daemonize", prosody.installed);
+end
 
 local function remove_log_sinks()
 	local lm = require "core.loggingmanager";