mod_posix: Add deprecation warning for the 'daemonize' option
authorKim Alvefur <zash@zash.se>
Sun, 26 Jan 2020 16:42:56 +0100
changeset 10632 25e178edbc2c
parent 10631 88be11e9f9b9
child 10633 eed5811941b2
mod_posix: Add deprecation warning for the 'daemonize' option
plugins/mod_posix.lua
--- a/plugins/mod_posix.lua	Sun Jan 26 16:40:21 2020 +0100
+++ b/plugins/mod_posix.lua	Sun Jan 26 16:42:56 2020 +0100
@@ -116,7 +116,11 @@
 
 if daemonize == nil then
 	-- Fall back to config file if not specified on command-line
-	daemonize = module:get_option("daemonize", prosody.installed);
+	daemonize = module:get_option_boolean("daemonize", nil);
+	if daemonize ~= nil then
+		module:log("warn", "The 'daemonize' option has been deprecated, specify -D or -F on the command line instead.");
+		-- TODO: Write some docs and include a link in the warning.
+	end
 end
 
 local function remove_log_sinks()