Check if a certificate already exists before trying to read it

master
kaiyou 7 years ago
parent 17b0471e73
commit 70d9972584

@ -28,7 +28,7 @@ def install_certs(domain):
else:
print("Could not find the proper certificate from traefik")
return
if os.path.join(cert_path):
if os.path.exists(cert_path):
with open(cert_path, "rb") as handler:
if handler.read() == cert:
return

Loading…
Cancel
Save