From d4b287ed08bcc6ee35b8fb9444ce247497d68bbd Mon Sep 17 00:00:00 2001 From: jolheiser Date: Sun, 23 Feb 2025 11:58:10 -0600 Subject: [PATCH] trap sigterm instead of kill --- cmd/ugitd/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/ugitd/main.go b/cmd/ugitd/main.go index 724a42b..afb48cd 100644 --- a/cmd/ugitd/main.go +++ b/cmd/ugitd/main.go @@ -11,6 +11,7 @@ import ( "path/filepath" "strconv" "strings" + "syscall" "github.com/go-chi/chi/v5/middleware" "github.com/go-chi/httplog/v2" @@ -111,7 +112,7 @@ func main() { } ch := make(chan os.Signal, 1) - signal.Notify(ch, os.Kill, os.Interrupt) + signal.Notify(ch, syscall.SIGTERM, os.Interrupt) <-ch }