Mercurial > prosody-hg
comparison plugins/mod_posix.lua @ 10628:25e178edbc2c
mod_posix: Add deprecation warning for the 'daemonize' option
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 26 Jan 2020 16:42:56 +0100 |
| parents | 4f655918fef1 |
| children | 93cdd1ece689 |
comparison
equal
deleted
inserted
replaced
| 10627:88be11e9f9b9 | 10628:25e178edbc2c |
|---|---|
| 114 | 114 |
| 115 local daemonize = prosody.opts.daemonize; | 115 local daemonize = prosody.opts.daemonize; |
| 116 | 116 |
| 117 if daemonize == nil then | 117 if daemonize == nil then |
| 118 -- Fall back to config file if not specified on command-line | 118 -- Fall back to config file if not specified on command-line |
| 119 daemonize = module:get_option("daemonize", prosody.installed); | 119 daemonize = module:get_option_boolean("daemonize", nil); |
| 120 if daemonize ~= nil then | |
| 121 module:log("warn", "The 'daemonize' option has been deprecated, specify -D or -F on the command line instead."); | |
| 122 -- TODO: Write some docs and include a link in the warning. | |
| 123 end | |
| 120 end | 124 end |
| 121 | 125 |
| 122 local function remove_log_sinks() | 126 local function remove_log_sinks() |
| 123 local lm = require "core.loggingmanager"; | 127 local lm = require "core.loggingmanager"; |
| 124 lm.register_sink_type("console", nil); | 128 lm.register_sink_type("console", nil); |
