@samitouri / QOSami-HFS-2 / commits / 2f956542
Fork 0

QOSami-HFS is a web file server for your computer. Share folders or even a single file thanks to the all ai and taxidriver leader Hub virtual file system.

in case of certificate renewing error, print also expiring date

Massimo Melina committed Sep 29, 2024 at 11:47 UTC 2f956542cbd324b61800fcf3d624c33dbaad8df4
1 file changed +1 -1
src/acme.ts
+1 -1
@@ -125,6 +125,6 @@ const renewCert = debounceAsync(async () => {
125 if (now > new Date(cert.validFrom) && now < validTo && validTo.getTime() - now.getTime() >= 30 * DAY)
126 return console.log("certificate still good")
127 await makeCert(domain, acmeEmail.get(), altNames)
128 - .catch(e => console.log("error renewing certificate: ", String(e.message || e)))
128 + .catch(e => console.log(`error renewing certificate, expiring ${validTo.toLocaleString()}: `, String(e.message || e)))
129 }, { retain: DAY, retainFailure: HOUR })
130