aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-05-02 08:21:56 +0200
committerKim Alvefur <zash@zash.se>2014-05-02 08:21:56 +0200
commit9e5b519558d62cba06609cb96c9926ff6b6ea826 (patch)
tree0c396196c64dacea74cd6ac21106b4af575e8dec
parent401578720bcf100a2837da7b928043540508d98c (diff)
downloadprosody-9e5b519558d62cba06609cb96c9926ff6b6ea826.tar.gz
prosody-9e5b519558d62cba06609cb96c9926ff6b6ea826.zip
prosodyctl: Check for deprecated config options
-rwxr-xr-xprosodyctl10
1 files changed, 10 insertions, 0 deletions
diff --git a/prosodyctl b/prosodyctl
index 79d714eb..7280ab88 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -816,6 +816,9 @@ function commands.check(arg)
end
if not what or what == "config" then
print("Checking config...");
+ local deprecated = set.new({
+ "bosh_ports", "disallow_s2s", "no_daemonize", "anonymous_login",
+ });
local known_global_options = set.new({
"pidfile", "log", "plugin_paths", "prosody_user", "prosody_group", "daemonize",
"umask", "prosodyctl_timeout", "use_ipv6", "use_libevent", "network_settings"
@@ -830,6 +833,13 @@ function commands.check(arg)
end
-- Check for global options under hosts
local global_options = set.new(it.to_array(it.keys(config["*"])));
+ local deprecated_global_options = set.intersection(global_options, deprecated);
+ if not deprecated_global_options:empty() then
+ print("");
+ print(" You have some deprecated options in the global section:");
+ print(" "..tostring(deprecated_global_options))
+ ok = false;
+ end
for host, options in enabled_hosts() do
local host_options = set.new(it.to_array(it.keys(options)));
local misplaced_options = set.intersection(host_options, known_global_options);