mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-01-22 18:08:14 -05:00
fix: renewCertTask
This commit is contained in:
parent
89e15fc438
commit
c14634d8e7
@ -7,17 +7,17 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *Controller) renewCertTask() {
|
func (c *Controller) renewCertTask() error {
|
||||||
l, err := lego.New(c.CertConfig)
|
l, err := lego.New(c.CertConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Print("new lego error: ", err)
|
log.Print("new lego error: ", err)
|
||||||
return
|
return nil
|
||||||
}
|
}
|
||||||
err = l.RenewCert()
|
err = l.RenewCert()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Print("renew cert error: ", err)
|
log.Print("renew cert error: ", err)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Controller) requestCert() error {
|
func (c *Controller) requestCert() error {
|
||||||
|
@ -32,7 +32,7 @@ func (c *Controller) startTasks(node *panel.NodeInfo) {
|
|||||||
default:
|
default:
|
||||||
c.renewCertPeriodic = &task.Task{
|
c.renewCertPeriodic = &task.Task{
|
||||||
Interval: time.Hour * 24,
|
Interval: time.Hour * 24,
|
||||||
Execute: c.reportUserTrafficTask,
|
Execute: c.renewCertTask,
|
||||||
}
|
}
|
||||||
log.WithField("tag", c.tag).Info("Start renew cert")
|
log.WithField("tag", c.tag).Info("Start renew cert")
|
||||||
// delay to start renewCert
|
// delay to start renewCert
|
||||||
|
Loading…
Reference in New Issue
Block a user