Keep -config-directory when running as Windows service (#2330)

* Keep -config-directory when running as Windows service

* Update changelog
This commit is contained in:
Pierre Fersing
2017-02-01 15:12:35 +01:00
committed by Cameron Sparr
parent 2932db8480
commit 32e06a489d
2 changed files with 4 additions and 1 deletions

View File

@@ -327,6 +327,9 @@ func main() {
if *fConfig != "" {
(*svcConfig).Arguments = []string{"-config", *fConfig}
}
if *fConfigDirectory != "" {
(*svcConfig).Arguments = append((*svcConfig).Arguments, "-config-directory", *fConfigDirectory)
}
err := service.Control(s, *fService)
if err != nil {
log.Fatal("E! " + err.Error())