- service: "stop" didn't work correctly
Close #1785 Squashed commit of the following: commit 40eba3049ac339b4e2537b2fd598c2fb1c6e8cd0 Author: Simon Zolin <s.zolin@adguard.com> Date: Wed Jun 10 19:43:14 2020 +0300 - service: "stop" didn't work correctly
This commit is contained in:
parent
a79dda5566
commit
cf087fb8ff
10
home/home.go
10
home/home.go
|
@ -110,11 +110,6 @@ func Main(version string, channel string, armVer string) {
|
||||||
// therefore, we must do it manually instead of using a lib
|
// therefore, we must do it manually instead of using a lib
|
||||||
args := loadOptions()
|
args := loadOptions()
|
||||||
|
|
||||||
if args.serviceControlAction != "" {
|
|
||||||
handleServiceControlAction(args.serviceControlAction)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
Context.appSignalChannel = make(chan os.Signal)
|
Context.appSignalChannel = make(chan os.Signal)
|
||||||
signal.Notify(Context.appSignalChannel, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGQUIT)
|
signal.Notify(Context.appSignalChannel, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGQUIT)
|
||||||
go func() {
|
go func() {
|
||||||
|
@ -134,6 +129,11 @@ func Main(version string, channel string, armVer string) {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
if args.serviceControlAction != "" {
|
||||||
|
handleServiceControlAction(args.serviceControlAction)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// run the protection
|
// run the protection
|
||||||
run(args)
|
run(args)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue