From 28440fc3ac91ad88d2d9146e275f85141e5dcd92 Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Fri, 17 May 2019 14:22:59 +0300 Subject: [PATCH] + set config.runningAsService --- app.go | 1 + config.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app.go b/app.go index e6057b43..1c32aa52 100644 --- a/app.go +++ b/app.go @@ -78,6 +78,7 @@ func run(args options) { if args.runningAsService { log.Info("AdGuard Home is running as a service") } + config.runningAsService = args.runningAsService config.firstRun = detectFirstRun() if config.firstRun { diff --git a/config.go b/config.go index c0319698..465258a6 100644 --- a/config.go +++ b/config.go @@ -37,6 +37,8 @@ type configuration struct { ourConfigFilename string // Config filename (can be overridden via the command line arguments) ourWorkingDir string // Location of our directory, used to protect against CWD being somewhere else firstRun bool // if set to true, don't run any services except HTTP web inteface, and serve only first-run html + // runningAsService flag is set to true when options are passed from the service runner + runningAsService bool BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server