feat: 支持强制daemon

This commit is contained in:
Mmx
2021-12-01 22:24:19 +08:00
parent 4fc8a5f8c1
commit b39f12c17c
2 changed files with 3 additions and 1 deletions

View File

@@ -48,7 +48,7 @@ func EnterGuardian() {
util.Log.OutPut = true
global.Status.Guardian = true
util.Log.Println("[Guardian mode]")
if global.Config.Settings.Daemon.Enable {
if global.Config.Settings.Daemon.Enable || global.Flags.Daemon {
if err := exec.Command(os.Args[0], "-running-daemon").Start(); err != nil {
util.Log.Fatalln(err)
}