aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-06-28 10:56:24 +0200
committerKim Alvefur <zash@zash.se>2018-06-28 10:56:24 +0200
commit1f1c577bbc5617c86582c8ac40b27e253f93d02d (patch)
tree51ca9506c4c0729dee37626c920fe07819d6752c
parent5855b7a10fd588bd3a6c08f72c56959d0377d192 (diff)
downloadprosody-1f1c577bbc5617c86582c8ac40b27e253f93d02d.tar.gz
prosody-1f1c577bbc5617c86582c8ac40b27e253f93d02d.zip
prosodyctl: Warn if attempting to run an unknown check (fixes #1161)
-rwxr-xr-xprosodyctl4
1 files changed, 4 insertions, 0 deletions
diff --git a/prosodyctl b/prosodyctl
index a28cbd02..e280367d 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -989,6 +989,10 @@ function commands.check(arg)
local ok = true;
local function disabled_hosts(host, conf) return host ~= "*" and conf.enabled ~= false; end
local function enabled_hosts() return it.filter(disabled_hosts, pairs(config.getconfig())); end
+ if not (what == nil or what == "disabled" or what == "config" or what == "dns" or what == "certs") then
+ show_warning("Don't know how to check '%s'. Try one of 'config', 'dns', 'certs' or 'disabled'.", what);
+ return 1;
+ end
if not what or what == "disabled" then
local disabled_hosts = set.new();
for host, host_options in it.filter("*", pairs(config.getconfig())) do