Skip to content

Commit

Permalink
- service: "stop" didn't work correctly
Browse files Browse the repository at this point in the history
Close #1785

Squashed commit of the following:

commit 40eba30
Author: Simon Zolin <[email protected]>
Date:   Wed Jun 10 19:43:14 2020 +0300

    - service: "stop" didn't work correctly
  • Loading branch information
szolin committed Jun 11, 2020
1 parent a79dda5 commit cf087fb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions home/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,6 @@ func Main(version string, channel string, armVer string) {
// therefore, we must do it manually instead of using a lib
args := loadOptions()

if args.serviceControlAction != "" {
handleServiceControlAction(args.serviceControlAction)
return
}

Context.appSignalChannel = make(chan os.Signal)
signal.Notify(Context.appSignalChannel, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGQUIT)
go func() {
Expand All @@ -134,6 +129,11 @@ func Main(version string, channel string, armVer string) {
}
}()

if args.serviceControlAction != "" {
handleServiceControlAction(args.serviceControlAction)
return
}

// run the protection
run(args)
}
Expand Down

0 comments on commit cf087fb

Please sign in to comment.