prosodyctl: Show an example ssl config after generating a certificate
authorKim Alvefur <zash@zash.se>
Sat, 9 Jan 2016 15:58:39 +0000 (16:58 +0100)
committerKim Alvefur <zash@zash.se>
Sat, 9 Jan 2016 15:58:39 +0000 (16:58 +0100)
prosodyctl

index e4ef45ad2a1f7f00d88488ddcb75d31689e248d5..0c80aca7bababafe49a6788ad4686c3ab6c4e438 100755 (executable)
@@ -792,6 +792,8 @@ function cert_commands.generate(arg)
                        and openssl.req{new=true, x509=true, nodes=true, key=key_filename,
                                days=365, sha256=true, utf8=true, config=conf_filename, out=cert_filename} then
                        show_message("Certificate written to ".. cert_filename);
+                       print();
+                       show_message(("Example config:\n\nssl = {\n\tcertificate = %q;\n\tkey = %q;\n}"):format(cert_filename, key_filename));
                else
                        show_message("There was a problem, see OpenSSL output");
                end