2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 08:16:28 +00:00

use certbot with -n option

allows us to use yes | bench setup lets-encrypt {clientsite}

it gets rid of certbot prompt

Cert not yet due for renewal

You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.
(ref: /etc/letsencrypt/renewal/stupidclientid.erp.openb.net.conf)

What would you like to do?
-------------------------------------------------------------------------------
1: Keep the existing certificate for now
2: Renew & replace the cert (limit ~5 per 7 days)
-------------------------------------------------------------------------------

automatically chooses option 1
This commit is contained in:
hansel 2017-06-06 12:40:11 +08:00 committed by GitHub
parent bee3de44e4
commit 549d442aa7

View File

@ -56,7 +56,7 @@ def run_certbot_and_setup_ssl(site, custom_domain, bench_path):
get_certbot()
try:
exec_cmd("{path} --config /etc/letsencrypt/configs/{site}.cfg certonly".format(path=get_certbot_path(), site=custom_domain or site))
exec_cmd("{path} -n --config /etc/letsencrypt/configs/{site}.cfg certonly".format(path=get_certbot_path(), site=custom_domain or site))
except CommandFailedError:
service('nginx', 'start')
print("There was a problem trying to setup SSL for your site")