From 3ab69263ef9e2e946e62c3ef33268949ff28561e Mon Sep 17 00:00:00 2001 From: jholdstock Date: Wed, 5 May 2021 17:10:43 +0100 Subject: [PATCH] Add SIGTERM and SIGHUP to shutdown signals. --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 30b63a3..274fe64 100644 --- a/main.go +++ b/main.go @@ -14,6 +14,7 @@ import ( "os/signal" "strings" "sync" + "syscall" "time" "github.com/decred/dcrd/rpcclient/v6" @@ -362,7 +363,7 @@ func mainCore() int { // Only accept a single CTRL+C c := make(chan os.Signal, 1) - signal.Notify(c, os.Interrupt) + signal.Notify(c, os.Interrupt, syscall.SIGTERM, syscall.SIGHUP) // Start waiting for the interrupt signal go func() {