如果系统安装了ntpdate,则自动尝试利用ntpdate同步时间

This commit is contained in:
刘祥超
2022-08-27 15:28:53 +08:00
parent 18f08525b9
commit abda886de5
2 changed files with 63 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ import (
"github.com/TeaOSLab/EdgeNode/internal/stats"
"github.com/TeaOSLab/EdgeNode/internal/trackers"
"github.com/TeaOSLab/EdgeNode/internal/utils"
"github.com/TeaOSLab/EdgeNode/internal/utils/clock"
"github.com/TeaOSLab/EdgeNode/internal/waf"
"github.com/andybalholm/brotli"
"github.com/iwind/TeaGo/Tea"
@@ -164,6 +165,11 @@ func (this *Node) Start() {
NewNodeStatusExecutor().Listen()
})
// 同步时间
goman.New(func() {
clock.Start()
})
// 读取配置
nodeConfig, err := nodeconfigs.SharedNodeConfig()
if err != nil {