Merge pull request #111 from Yuzuki616/dev

Dev
This commit is contained in:
Yuzuki 2023-07-28 07:24:38 +08:00 committed by GitHub
commit 42a7ab6f43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -7,17 +7,17 @@ import (
"log"
)
func (c *Controller) renewCertTask() {
func (c *Controller) renewCertTask() error {
l, err := lego.New(c.CertConfig)
if err != nil {
log.Print("new lego error: ", err)
return
return nil
}
err = l.RenewCert()
if err != nil {
log.Print("renew cert error: ", err)
return
}
return nil
}
func (c *Controller) requestCert() error {

View File

@ -32,7 +32,7 @@ func (c *Controller) startTasks(node *panel.NodeInfo) {
default:
c.renewCertPeriodic = &task.Task{
Interval: time.Hour * 24,
Execute: c.reportUserTrafficTask,
Execute: c.renewCertTask,
}
log.WithField("tag", c.tag).Info("Start renew cert")
// delay to start renewCert