module/acme: Do not exit early when the certificate already exists

Otherwise, acme.cert might fail to cert permissions on the certificate.

Close #48626
This commit is contained in:
Nicolas Braud-Santoni 2018-07-17 22:56:05 +02:00
parent 98af0db826
commit d2241ceb2d

View file

@ -170,11 +170,8 @@ def cert(name,
return {'result': False, 'comment': 'Certificate {0} renewal failed with:\n{1}'.format(name, res['stderr'])}
if 'no action taken' in res['stdout']:
return {'result': None,
'comment': 'No action taken on certificate {0}'.format(cert_file),
'not_after': expires(name)}
if renew:
comment = 'Certificate {0} unchanged'.format(cert_file)
elif renew:
comment = 'Certificate {0} renewed'.format(name)
else:
comment = 'Certificate {0} obtained'.format(name)