aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-05-22 13:33:33 +0100
committerMatthew Wild <mwild1@gmail.com>2013-05-22 13:33:33 +0100
commita8da45a1b9aca9dae8e2d9ceeb491815716df340 (patch)
tree214a2a80ef634f8361aecd0267c21f27722d3a61 /prosodyctl
parente6533b846352a28dd37578f1e366d8d61cd11622 (diff)
downloadprosody-a8da45a1b9aca9dae8e2d9ceeb491815716df340.tar.gz
prosody-a8da45a1b9aca9dae8e2d9ceeb491815716df340.zip
prosodyctl: check dns: Add check that proxy65 addresses resolve correctly
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl19
1 files changed, 19 insertions, 0 deletions
diff --git a/prosodyctl b/prosodyctl
index c0f5dd92..4d7f678f 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -933,6 +933,25 @@ function commands.check(arg)
target_hosts:remove("localhost");
end
+ local modules = set.new(it.to_array(it.values(host_options.modules_enabled)))
+ + set.new(it.to_array(it.values(config.get("*", "modules_enabled"))))
+ + set.new({ config.get(host, "component_module") });
+
+ if modules:contains("proxy65") then
+ local proxy65_target = config.get(host, "proxy65_address") or host;
+ local A, AAAA = dns.lookup(proxy65_target, "A"), dns.lookup(proxy65_target, "AAAA");
+ local prob = {};
+ if not A then
+ table.insert(prob, "A");
+ end
+ if v6_supported and not AAAA then
+ table.insert(prob, "AAAA");
+ end
+ if #prob > 0 then
+ print(" File transfer proxy "..proxy65_target.." has no "..table.concat(prob, "/").." record. Create one or set 'proxy65_address' to the correct host/IP.");
+ end
+ end
+
for host in target_hosts do
local host_ok_v4, host_ok_v6;
local res = dns.lookup(host, "A");