all repos — searchix @ ff3d5a36af52cf8bb06bf9c0e3a519536e2fa2f2

Search engine for NixOS, nix-darwin, home-manager and NUR users

fix: enable graceful shutdown

Alan Pearce
commit

ff3d5a36af52cf8bb06bf9c0e3a519536e2fa2f2

parent

9e732c7a4fd3c7214c1511b695ca99d65159100e

1 file changed, 2 insertions(+), 1 deletion(-)

changed files
M cmd/searchix-web/serve.gocmd/searchix-web/serve.go
@@ -6,6 +6,7 @@ "errors"
"os" "os/signal" "sync" + "syscall" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg"
@@ -22,7 +23,7 @@
type ServeOptions struct{} func (opts *ServeOptions) Execute(_ []string) (err error) { - ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt) + ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM) defer cancel() root, err := file.CreateAndOpenRoot(cfg.DataPath)