This commit is contained in:
@@ -36,9 +36,6 @@ func (w wireguard) Apply(templateFilePath, configFilePath string, data any) (err
|
||||
switch config.Config.Wireguard.ListenConfig {
|
||||
case "auto":
|
||||
w.watchListConfig(configFilePath)
|
||||
case "hand": // 手动操作
|
||||
command.RestartWireguard(true)
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -72,7 +69,7 @@ func (wireguard) watchListConfig(filePath string) {
|
||||
}
|
||||
|
||||
// 打印监听事件
|
||||
log.Errorf("监听事件是:%s", event.String())
|
||||
log.Infof("监听事件是:%s", event.String())
|
||||
case _, ok := <-watcher.Errors:
|
||||
if !ok {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user