feat: 细化配置文件,不兼容性更新

This commit is contained in:
Mmx
2021-11-25 08:25:03 +08:00
parent 5aa82c3fd9
commit 884934b951
5 changed files with 23 additions and 7 deletions

View File

@@ -35,7 +35,7 @@ func Guardian(output bool) {
c <- false
}()
<-c
time.Sleep(time.Duration(global.Config.Settings.Guardian) * time.Second)
time.Sleep(time.Duration(global.Config.Settings.Guardian.Duration) * time.Second)
}
}
@@ -43,7 +43,7 @@ func EnterGuardian() {
global.Status.Output = true
global.Status.Guardian = true
util.Log.Println("[Guardian mode]")
if global.Config.Settings.Daemon {
if global.Config.Settings.Daemon.Enable {
if err := exec.Command(os.Args[0], "-daemon").Start(); err != nil {
util.Log.Fatalln(err)
}