fix certfile existence check
authorRalf Jung <post@ralfj.de>
Sun, 29 Jan 2023 21:36:16 +0000 (22:36 +0100)
committerRalf Jung <post@ralfj.de>
Sun, 29 Jan 2023 21:36:16 +0000 (22:36 +0100)
letsencrypt-tiny

index 6df989b772fa52439947d3a95650e41f6cb0f82e..26b2c1d5e3163b661b5c0ad3c285cd2acf94762f 100755 (executable)
@@ -124,7 +124,7 @@ def auto_renewal(live, staging):
     now = datetime.datetime.now()
     key_age = now - key_mtime(live)
     need_new_key = key_age >= max_key_age
     now = datetime.datetime.now()
     key_age = now - key_mtime(live)
     need_new_key = key_age >= max_key_age
-    if os.path.exists(live):
+    if os.path.exists(certfile(live)):
         cert_validity = cert_expiry(live) - now
         need_new_cert = cert_validity <= renew_cert_time
     else:
         cert_validity = cert_expiry(live) - now
         need_new_cert = cert_validity <= renew_cert_time
     else: