ACME: renew certificates 30 days before expiry, like the official certbot client

This commit is contained in:
Jamie Hewland 2016-09-01 15:40:49 +02:00
parent 3c5605b793
commit 1872e2b63d

View file

@ -152,8 +152,8 @@ func (dc *DomainsCertificate) needRenew() bool {
// If there's an error, we assume the cert is broken, and needs update
return true
}
// <= 7 days left, renew certificate
if crt.NotAfter.Before(time.Now().Add(time.Duration(24 * 7 * time.Hour))) {
// <= 30 days left, renew certificate
if crt.NotAfter.Before(time.Now().Add(time.Duration(24 * 30 * time.Hour))) {
return true
}
}