# HG changeset patch # User Kim Alvefur # Date 1505747195 -7200 # Node ID 2c386ee5cd5c196752ddea2661888ccaddcb5f26 # Parent 177873dc9cf3e18e19bc9256f48ce357a0e1867e prosodyctl: Use all enabled hosts if no hostnames passed to cert import diff -r 177873dc9cf3 -r 2c386ee5cd5c prosodyctl --- a/prosodyctl Sat Sep 16 17:24:13 2017 +0200 +++ b/prosodyctl Mon Sep 18 17:06:35 2017 +0200 @@ -870,8 +870,15 @@ while arg[1] and prosody.hosts[ arg[1] ] do 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 + table.insert(hostnames, host); + end + end + end if not arg[1] or arg[1] == "--help" then -- Probably forgot the path - show_usage("cert import HOSTNAME [HOSTNAME+] /path/to/certs [/other/paths/]+", + show_usage("cert import [HOSTNAME+] /path/to/certs [/other/paths/]+", "Copies certificates to "..cert_basedir); return 1; end