[PR #600] [CLOSED] Improve signal handling #1514

Closed
opened 2025-12-29 02:30:21 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/600
Author: @kradalby
Created: 5/31/2022
Status: Closed

Base: mainHead: signals


📝 Commits (9)

  • 764ed91 Improve signal handling
  • ce01241 Update changelog
  • 00f496e Fix logtail config function name
  • f9d38e5 Make config get function global
  • af44dc5 Make ACL policy part of the config struct
  • e4faa79 Use config object instead of viper for policy path
  • 09fa0eb Rename abspath function to describe what it does
  • 667af46 Move Abspath function to headscale utils
  • 4d23910 Support reloading ACLs with SIGHUP

📊 Changes

4 files changed (+100 additions, -39 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 app.go (+61 -13)
📝 cmd/headscale/cli/utils.go (+22 -26)
📝 utils.go (+16 -0)

📄 Description

This PR resolves #173, allowing the users to send a reload signal (SIGHUP) to headscale to reload its config and ACLs.

In addition, sending a SIGTERM, SIGINT etc, will now attempt to shutdown headscale gracefully.

  • read the CONTRIBUTING guidelines
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/600 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 5/31/2022 **Status:** ❌ Closed **Base:** `main` ← **Head:** `signals` --- ### 📝 Commits (9) - [`764ed91`](https://github.com/juanfont/headscale/commit/764ed9120c85132d840542577ccd9b781d0bd27e) Improve signal handling - [`ce01241`](https://github.com/juanfont/headscale/commit/ce01241b505f91cdac843df08037d3905955b54a) Update changelog - [`00f496e`](https://github.com/juanfont/headscale/commit/00f496e4d4b7f966ca8551ce8f4ae3fa0005c186) Fix logtail config function name - [`f9d38e5`](https://github.com/juanfont/headscale/commit/f9d38e50488c69c4503b705494ea8a1446bb9fb5) Make config get function global - [`af44dc5`](https://github.com/juanfont/headscale/commit/af44dc589de4dd75dc74dc403530c6eb2537bb0a) Make ACL policy part of the config struct - [`e4faa79`](https://github.com/juanfont/headscale/commit/e4faa79bdb49bb75b8c1c6bbd9514204590bd30d) Use config object instead of viper for policy path - [`09fa0eb`](https://github.com/juanfont/headscale/commit/09fa0eb0ca7113c3e36818791a4c4cc29901f34c) Rename abspath function to describe what it does - [`667af46`](https://github.com/juanfont/headscale/commit/667af46afef8a167cfd66803542be672d4284c92) Move Abspath function to headscale utils - [`4d23910`](https://github.com/juanfont/headscale/commit/4d23910ec6a614dd54bd4008e4079bd6568ef15c) Support reloading ACLs with SIGHUP ### 📊 Changes **4 files changed** (+100 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `app.go` (+61 -13) 📝 `cmd/headscale/cli/utils.go` (+22 -26) 📝 `utils.go` (+16 -0) </details> ### 📄 Description This PR resolves #173, allowing the users to send a reload signal (SIGHUP) to headscale to reload its config and ACLs. In addition, sending a SIGTERM, SIGINT etc, will now attempt to shutdown headscale gracefully. <!-- Please tick if the following things apply. You… --> - [x] read the [CONTRIBUTING guidelines](README.md#contributing) - [x] raised a GitHub issue or discussed it on the projects chat beforehand - [x] added unit tests - [x] added integration tests - [x] updated documentation if needed - [ ] updated CHANGELOG.md <!-- If applicable, please reference the issue using `Fixes #XXX` and add tests to cover your new code. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 02:30:21 +01:00
adam closed this issue 2025-12-29 02:30:21 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1514