Add _cert_exists to check if certificate is already generated

This commit is contained in:
selfhoster1312 2024-05-10 18:02:40 +02:00
parent 5efd72a9d7
commit 74dced9b00

View file

@ -627,6 +627,9 @@ def _prepare_certificate_signing_request(domain, key_file, output_folder):
with open(csr_file, "wb") as f:
f.write(crypto.dump_certificate_request(crypto.FILETYPE_PEM, csr))
def _cert_exists(domain): bool
cert_file = os.path.join(CERT_FOLDER, domain, "crt.pem")
return os.path.isfile(cert_file)
def _get_status(domain):
cert_file = os.path.join(CERT_FOLDER, domain, "crt.pem")