Skip to content

Commit

Permalink
Exit 0 on SIGTERM
Browse files Browse the repository at this point in the history
Signed-off-by: Faisal Memon <[email protected]>
  • Loading branch information
faisal-memon committed Sep 5, 2024
1 parent 9dcaa32 commit 63f6c6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/spiffe-helper/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"os"
"os/signal"
"syscall"

"github.com/sirupsen/logrus"
"github.com/spiffe/spiffe-helper/cmd/spiffe-helper/config"
Expand All @@ -32,7 +33,7 @@ func main() {
}

func startSidecar(configFile string, daemonModeFlag bool, log logrus.FieldLogger) error {
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()

log.Infof("Using configuration file: %q", configFile)
Expand Down

0 comments on commit 63f6c6d

Please sign in to comment.