Skip to content

Commit

Permalink
Handle SIGTERM signal as well
Browse files Browse the repository at this point in the history
  • Loading branch information
yakud committed Jun 11, 2024
1 parent 5d0b73b commit c55e08f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/galacticad-merkle/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"os/signal"
"path/filepath"
"slices"
"syscall"

db "github.com/cometbft/cometbft-db"
"github.com/cometbft/cometbft/libs/log"
Expand Down Expand Up @@ -74,7 +75,7 @@ This is a CLI tool to interact with the Galactica Network merkle service.`,
}

func Execute() {
rootCtx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
rootCtx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer cancel()

rootCmd := initRootCmd(createRootCmd())
Expand Down

0 comments on commit c55e08f

Please sign in to comment.