cert: only inform user if renewal fails and only 10 days left
This commit is contained in:
@@ -247,6 +247,7 @@ async function onEvent(id, action, source, data) {
|
||||
case eventlog.ACTION_CERTIFICATE_RENEWAL:
|
||||
case eventlog.ACTION_CERTIFICATE_NEW:
|
||||
if (!data.errorMessage) return;
|
||||
if (!data.notAfter || (data.notAfter - new Date() >= (60 * 60 * 24 * 10 * 1000))) return; // more than 10 days left to expire
|
||||
return await certificateRenewalError(id, data.domain, data.errorMessage);
|
||||
|
||||
case eventlog.ACTION_BACKUP_FINISH:
|
||||
|
||||
Reference in New Issue
Block a user