dont renew unless timeleft < 30 days

This commit is contained in:
m5r
2023-02-26 14:35:07 +01:00
parent bd5bd0e7a1
commit 45e35acfd9
2 changed files with 17 additions and 5 deletions

View File

@@ -2,7 +2,6 @@ package main
import (
"flag"
"log"
"strings"
"time"
@@ -23,7 +22,6 @@ func main() {
go func() {
account := certs.LoadAccount()
log.Println(account.Registration.Body.Contact)
certsClient := certs.NewCertsClient(n, account)
time.Sleep(5 * time.Second)
@@ -32,7 +30,7 @@ func main() {
for {
// renew certificate every month
time.Sleep(30 * 24 * time.Hour)
certsClient.RenewCertificate()
certsClient.RequestCertificate()
}
}()