fix: graceful shutdown (#134)

* fix: graceful shutdown

* fix: windows graceful shutdown
This commit is contained in:
Mikhail Bragin
2021-10-17 22:15:38 +02:00
committed by GitHub
parent fcea3c99d4
commit bef3b3392b
8 changed files with 79 additions and 43 deletions

View File

@ -31,7 +31,8 @@ var (
}
// Execution control channel for stopCh signal
stopCh chan int
stopCh chan int
cleanupCh chan struct{}
)
// Execute executes the root command.
@ -41,6 +42,7 @@ func Execute() error {
func init() {
stopCh = make(chan int)
cleanupCh = make(chan struct{})
defaultConfigPath = "/etc/wiretrustee/config.json"
defaultLogFile = "/var/log/wiretrustee/client.log"