mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
headscale: fix reacting to SIGTERM
The current version of headscale does not react to SIGTERMs and so it can only be terminated by a SIGKILL at the moment. This commit provides a patch to fix this.
This commit is contained in:
parent
ae84fdb5e1
commit
37947d59ea
@ -21,6 +21,10 @@ buildGoModule rec {
|
||||
patches = [
|
||||
# backport of https://github.com/juanfont/headscale/pull/1697
|
||||
./trim-oidc-secret-path.patch
|
||||
|
||||
# fix for headscale not reacting to SIGTERM
|
||||
# see https://github.com/juanfont/headscale/pull/1480 and https://github.com/juanfont/headscale/issues/1461
|
||||
./sigterm-fix.patch
|
||||
];
|
||||
|
||||
ldflags = ["-s" "-w" "-X github.com/juanfont/headscale/cmd/headscale/cli.Version=v${version}"];
|
||||
|
12
pkgs/servers/headscale/sigterm-fix.patch
Normal file
12
pkgs/servers/headscale/sigterm-fix.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/hscontrol/app.go b/hscontrol/app.go
|
||||
index b8dceba..4bcf019 100644
|
||||
--- a/hscontrol/app.go
|
||||
+++ b/hscontrol/app.go
|
||||
@@ -821,6 +821,7 @@ func (h *Headscale) Serve() error {
|
||||
|
||||
// And we're done:
|
||||
cancel()
|
||||
+ return
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user