diff options
author | Kim Alvefur <zash@zash.se> | 2013-04-29 14:01:19 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2013-04-29 14:01:19 +0200 |
commit | fa64a6385229dbe368d826b40afd6c909ed570fd (patch) | |
tree | 42d11080b7f3bc1cb02622189b19a148a481081e /prosodyctl | |
parent | 8a944c697867a1b60ebd0c60a00e551fb2f23c75 (diff) | |
download | prosody-fa64a6385229dbe368d826b40afd6c909ed570fd.tar.gz prosody-fa64a6385229dbe368d826b40afd6c909ed570fd.zip |
prosodyctl: Guess the country from the TLD for the cert config
Diffstat (limited to 'prosodyctl')
-rwxr-xr-x | prosodyctl | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -670,6 +670,11 @@ function cert_commands.config(arg) v = arg[1] elseif k == "emailAddress" then v = "xmpp@" .. arg[1]; + elseif k == "countryName" then + local tld = arg[1]:match"%.([a-z]+)$"; + if tld and #tld == 2 and tld ~= "uk" then + v = tld:upper(); + end end nv = show_prompt(("%s (%s):"):format(k, nv or v)); nv = (not nv or nv == "") and v or nv; |