From 22a4d49ed0f4248239de45ca2e4ef4d46370bce3 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Wed, 25 Jan 2017 07:33:35 +0000 Subject: [PATCH] cmd/syncthing: Handle -logfile again (fixes #3931) The monitor process should not set STNORESTART as this indicates the intention from the user. Setting STMONITORED is enough, as this tells the next Syncthing instance that it is running under the monitor process. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3932 --- cmd/syncthing/main.go | 2 +- cmd/syncthing/monitor.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index 44b31a2cb..26b6dbf6e 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -401,7 +401,7 @@ func main() { return } - if options.noRestart { + if innerProcess || options.noRestart { syncthingMain(options) } else { monitorMain(options) diff --git a/cmd/syncthing/monitor.go b/cmd/syncthing/monitor.go index 89cd82462..f64ee88ac 100644 --- a/cmd/syncthing/monitor.go +++ b/cmd/syncthing/monitor.go @@ -35,7 +35,6 @@ const ( ) func monitorMain(runtimeOptions RuntimeOptions) { - os.Setenv("STNORESTART", "yes") os.Setenv("STMONITORED", "yes") l.SetPrefix("[monitor] ")