mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-01-22 09:58:14 -05:00
fix: renewCertTask
This commit is contained in:
parent
89e15fc438
commit
c14634d8e7
@ -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 {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user