fix certfile existence check
[lets-encrypt-tiny.git] / 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
-    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: