aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl11
1 files changed, 9 insertions, 2 deletions
diff --git a/prosodyctl b/prosodyctl
index 74bb2ad8..cdcd25d9 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -871,10 +871,17 @@ function cert_commands.import(arg)
table.insert(hostnames, table.remove(arg, 1));
end
if hostnames[1] == nil then
- for host in pairs(prosody.hosts) do
- if host ~= "*" and config.get(host, "enabled") ~= false then
+ local domains = os.getenv"RENEWED_DOMAINS"; -- Set if invoked via certbot
+ if domains then
+ for host in domains:gmatch("%S+") do
table.insert(hostnames, host);
end
+ else
+ for host in pairs(prosody.hosts) do
+ if host ~= "*" and config.get(host, "enabled") ~= false then
+ table.insert(hostnames, host);
+ end
+ end
end
end
if not arg[1] or arg[1] == "--help" then -- Probably forgot the path