cmd/tailscaled: log on shutdown signal

This commit is contained in:
Brad Fitzpatrick 2020-07-30 08:49:17 -07:00
parent 2072dcc127
commit ff8c8db9d3
1 changed files with 2 additions and 1 deletions

View File

@ -153,7 +153,8 @@ func run() error {
interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, syscall.SIGINT, syscall.SIGTERM)
select {
case <-interrupt:
case s := <-interrupt:
logf("tailscaled got signal %v; shutting down", s)
cancel()
case <-ctx.Done():
// continue