From 4167f630b8e54b56afc15c0362382a75e2d35058 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 19 Jan 2020 15:28:09 +0000 Subject: mod_posix: Support for command-line flags to override 'daemonize' config option -D / --daemonize -F / --no-daemonize --- plugins/mod_posix.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins/mod_posix.lua') diff --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua index 23df4d23..fe826c22 100644 --- a/plugins/mod_posix.lua +++ b/plugins/mod_posix.lua @@ -126,7 +126,12 @@ function syslog_sink_maker(config) -- luacheck: ignore 212/config 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"; -- cgit v1.2.3