ACME: renew certificates 30 days before expiry, like the official certbot client
This commit is contained in:
parent
3c5605b793
commit
1872e2b63d
1 changed files with 2 additions and 2 deletions
|
@ -152,8 +152,8 @@ func (dc *DomainsCertificate) needRenew() bool {
|
||||||
// If there's an error, we assume the cert is broken, and needs update
|
// If there's an error, we assume the cert is broken, and needs update
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
// <= 7 days left, renew certificate
|
// <= 30 days left, renew certificate
|
||||||
if crt.NotAfter.Before(time.Now().Add(time.Duration(24 * 7 * time.Hour))) {
|
if crt.NotAfter.Before(time.Now().Add(time.Duration(24 * 30 * time.Hour))) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue