mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-05 14:17:36 +03:00
Revert "move ConfigLoad into Start function when running as a service"
This reverts commit 9aeec3478f
.
This commit is contained in:
parent
12eaec9104
commit
778b2cccc1
2 changed files with 11 additions and 13 deletions
|
@ -56,6 +56,9 @@ func main() {
|
|||
}
|
||||
app.proxy = NewProxy()
|
||||
_ = ServiceManagerStartNotify()
|
||||
if err := ConfigLoad(app.proxy, svcFlag); err != nil {
|
||||
dlog.Fatal(err)
|
||||
}
|
||||
if len(*svcFlag) != 0 {
|
||||
if svc == nil {
|
||||
dlog.Fatal("Built-in service installation is not supported on this platform")
|
||||
|
@ -82,9 +85,6 @@ func main() {
|
|||
dlog.Fatal(err)
|
||||
}
|
||||
} else {
|
||||
if err := ConfigLoad(app.proxy); err != nil {
|
||||
dlog.Fatal(err)
|
||||
}
|
||||
app.signalWatch()
|
||||
app.appMain()
|
||||
}
|
||||
|
@ -93,15 +93,10 @@ func main() {
|
|||
}
|
||||
|
||||
func (app *App) Start(service service.Service) error {
|
||||
go func() {
|
||||
if err := ConfigLoad(app.proxy); err != nil {
|
||||
dlog.Fatal(err)
|
||||
}
|
||||
if err := app.proxy.InitPluginsGlobals(); err != nil {
|
||||
dlog.Fatal(err)
|
||||
}
|
||||
app.appMain()
|
||||
}()
|
||||
if err := app.proxy.InitPluginsGlobals(); err != nil {
|
||||
dlog.Fatal(err)
|
||||
}
|
||||
go app.appMain()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue