aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl/check.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-07-04 01:29:47 +0200
committerKim Alvefur <zash@zash.se>2021-07-04 01:29:47 +0200
commit0409851d7478f94213970f91afbbb870a0d7589d (patch)
tree6a23083bd46be575daa236ed0f4724771277900b /util/prosodyctl/check.lua
parent87e144366cf3ef6f2c57103ab3de5663ebecb2ac (diff)
downloadprosody-0409851d7478f94213970f91afbbb870a0d7589d.tar.gz
prosody-0409851d7478f94213970f91afbbb870a0d7589d.zip
util.prosodyctl.check: Warn if both use_ipv4 and use_ipv6 are set to false
Why would you do this?!
Diffstat (limited to 'util/prosodyctl/check.lua')
-rw-r--r--util/prosodyctl/check.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/prosodyctl/check.lua b/util/prosodyctl/check.lua
index 8e331b25..f8c8c55e 100644
--- a/util/prosodyctl/check.lua
+++ b/util/prosodyctl/check.lua
@@ -473,6 +473,12 @@ local function check(arg)
local use_ipv4 = configmanager.get("*", "use_ipv4") ~= false;
local use_ipv6 = configmanager.get("*", "use_ipv6") ~= false;
+ if not use_ipv4 and not use_ipv6 then
+ print(" Both IPv6 and IPv4 are disabled, Prosody will not listen on any ports");
+ print(" nor be able to connect to any remote servers.");
+ all_targets_ok = false;
+ end
+
for target_host in target_hosts do
local host_ok_v4, host_ok_v6;
do