Fixed the ctl + c exit
The removal of electron was a bit too expeditious and removed some of the things that controled the exit of the system Change-Id: I8ad1ab83fc3ecbcbe07bdd949bc01fd8a0889e00
This commit is contained in:
parent
8cd169351f
commit
d1a0509bf0
@ -80,7 +80,14 @@ func launch(cmd *cobra.Command, args []string) {
|
||||
webservice.SendAlert(configs.Info, fmt.Sprintf("%s", err), true)
|
||||
}
|
||||
|
||||
// start the web service and related sundries
|
||||
// start webservice and listen for the the ctl + c to exit
|
||||
c := make(chan os.Signal)
|
||||
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
||||
go func() {
|
||||
<-c
|
||||
log.Println("Exiting the webservice")
|
||||
os.Exit(0)
|
||||
}()
|
||||
webservice.WebServer()
|
||||
|
||||
// cancel running plugins and wait for shut down
|
||||
|
Loading…
Reference in New Issue
Block a user