Comparison

util/prosodyctl/check.lua @ 11652:887d7b15e21b

util.prosodyctl.check: Warn if both use_ipv4 and use_ipv6 are set to false Why would you do this?!
author Kim Alvefur <zash@zash.se>
date Sun, 04 Jul 2021 01:29:47 +0200
parent 11651:c9f46d28ed7e
child 11653:51141309ffc4
comparison
equal deleted inserted replaced
11651:c9f46d28ed7e 11652:887d7b15e21b
471 end 471 end
472 end 472 end
473 473
474 local use_ipv4 = configmanager.get("*", "use_ipv4") ~= false; 474 local use_ipv4 = configmanager.get("*", "use_ipv4") ~= false;
475 local use_ipv6 = configmanager.get("*", "use_ipv6") ~= false; 475 local use_ipv6 = configmanager.get("*", "use_ipv6") ~= false;
476 if not use_ipv4 and not use_ipv6 then
477 print(" Both IPv6 and IPv4 are disabled, Prosody will not listen on any ports");
478 print(" nor be able to connect to any remote servers.");
479 all_targets_ok = false;
480 end
481
476 for target_host in target_hosts do 482 for target_host in target_hosts do
477 local host_ok_v4, host_ok_v6; 483 local host_ok_v4, host_ok_v6;
478 do 484 do
479 local res = dns.lookup(idna.to_ascii(target_host), "A"); 485 local res = dns.lookup(idna.to_ascii(target_host), "A");
480 if res then 486 if res then