aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_posix.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-01-19 15:28:09 +0000
committerMatthew Wild <mwild1@gmail.com>2020-01-19 15:28:09 +0000
commit7c65f89960200091fe08fe29ee195b811f56155c (patch)
treeff30b72975ef2d20fa325843ee2b00bfe7f15292 /plugins/mod_posix.lua
parentaa2d0321791db0042af7eb07b59e644fcfc544bc (diff)
downloadprosody-7c65f89960200091fe08fe29ee195b811f56155c.tar.gz
prosody-7c65f89960200091fe08fe29ee195b811f56155c.zip
mod_posix: Support for command-line flags to override 'daemonize' config option
-D / --daemonize -F / --no-daemonize
Diffstat (limited to 'plugins/mod_posix.lua')
-rw-r--r--plugins/mod_posix.lua7
1 files changed, 6 insertions, 1 deletions
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";