aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-08-30 00:17:54 +0200
committerKim Alvefur <zash@zash.se>2018-08-30 00:17:54 +0200
commit6079a380d8d351d41f90b521618ab7084fafb21c (patch)
tree41425d25cb784418e4065bf26d5dd23b54770830
parent15d8f1c004f557063b3c90280a25de55fad3a7be (diff)
downloadprosody-6079a380d8d351d41f90b521618ab7084fafb21c.tar.gz
prosody-6079a380d8d351d41f90b521618ab7084fafb21c.zip
prosodyctl: Also look for options that belong in global section under disabled hosts (fixes #1207)
Thanks ivucica
-rwxr-xr-xprosodyctl5
1 files changed, 4 insertions, 1 deletions
diff --git a/prosodyctl b/prosodyctl
index 8f1f6b5d..98063d4a 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -864,7 +864,7 @@ function commands.check(arg)
print(" "..tostring(deprecated_global_options))
ok = false;
end
- for host, options in enabled_hosts() do
+ for host, options in it.filter(function (h) return h ~= "*" end, pairs(configmanager.getconfig())) do
local host_options = set.new(it.to_array(it.keys(options)));
local misplaced_options = set.intersection(host_options, known_global_options);
for name in pairs(options) do
@@ -884,6 +884,9 @@ function commands.check(arg)
print("");
print(" You need to move the following option"..(n>1 and "s" or "")..": "..table.concat(it.to_array(misplaced_options), ", "));
end
+ end
+ for host, options in enabled_hosts() do
+ local host_options = set.new(it.to_array(it.keys(options)));
local subdomain = host:match("^[^.]+");
if not(host_options:contains("component_module")) and (subdomain == "jabber" or subdomain == "xmpp"
or subdomain == "chat" or subdomain == "im") then