certificate.py: drop legacy 000-acmechallenge.conf stuff

This commit is contained in:
Alexandre Aubin 2021-09-21 16:08:24 +02:00
parent ae08698253
commit 9bcb7e0b9e

View file

@ -500,13 +500,7 @@ Subject: %s
def _check_acme_challenge_configuration(domain): def _check_acme_challenge_configuration(domain):
domain_conf = "/etc/nginx/conf.d/%s.conf" % domain domain_conf = "/etc/nginx/conf.d/%s.conf" % domain
if "include /etc/nginx/conf.d/acme-challenge.conf.inc" in read_file(domain_conf): return "include /etc/nginx/conf.d/acme-challenge.conf.inc" in read_file(domain_conf)
return True
else:
# This is for legacy setups which haven't updated their domain conf to
# the new conf that include the acme snippet...
legacy_acme_conf = "/etc/nginx/conf.d/%s.d/000-acmechallenge.conf" % domain
return os.path.exists(legacy_acme_conf)
def _fetch_and_enable_new_certificate(domain, staging=False, no_checks=False): def _fetch_and_enable_new_certificate(domain, staging=False, no_checks=False):