Make sure the account key exists when renewing certificate (in particular because the account key is not backup/restored)

This commit is contained in:
Alexandre Aubin 2020-11-01 18:59:23 +01:00
parent 7aa3ff5255
commit 337387ccbc

View file

@ -483,6 +483,10 @@ def _check_acme_challenge_configuration(domain):
def _fetch_and_enable_new_certificate(domain, staging=False, no_checks=False):
if not os.path.exists(ACCOUNT_KEY_FILE):
_generate_account_key()
# Make sure tmp folder exists
logger.debug("Making sure tmp folders exists...")