add --replace-all argument to ssl_certificates.py
This commit is contained in:
parent
91d7151101
commit
e09230192f
|
@ -182,10 +182,13 @@ def get_certificates_to_provision(env):
|
|||
domains.add(domain)
|
||||
else:
|
||||
cert = cert["certificate_object"]
|
||||
import sys
|
||||
if cert.issuer == cert.subject:
|
||||
# This is self-signed. Get a real one.
|
||||
domains.add(domain)
|
||||
|
||||
elif "--replace-all" in sys.argv:
|
||||
domains.add(domain)
|
||||
|
||||
# Valid certificate today, but is it expiring soon?
|
||||
elif cert.not_valid_after-now < datetime.timedelta(days=14):
|
||||
domains.add(domain)
|
||||
|
@ -709,4 +712,4 @@ def get_certificate_domains(cert):
|
|||
|
||||
if __name__ == "__main__":
|
||||
# Provision certificates.
|
||||
provision_certificates_cmdline()
|
||||
provision_certificates_cmdline()
|
||||
|
|
Loading…
Reference in New Issue