Skip to content

Add "configtest" CLI command.#1230

Merged
kradalby merged 2 commits intojuanfont:mainfrom
linsomniac:configtest
Mar 3, 2023
Merged

Add "configtest" CLI command.#1230
kradalby merged 2 commits intojuanfont:mainfrom
linsomniac:configtest

Conversation

@linsomniac
Copy link
Copy Markdown
Contributor

This adds a "configtest" command-line argument that sets up an instance of Headscale and exits, causing the configuration file and ACLs to be processed.

This solves a problem I've been having where the only way I know to test the ACLs syntax is to restart headscale, and if it fails to start I need to login via another system and correct the problem, then restart headscale.

This is the first time I've touched go, so if you ask too much of me in review I'm likely to be out of my element quickly. :-)

Fixes #1229

  • 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 adds a "configtest" command-line argument that sets up an instance
of Headscale and exits, causing the configuration file and ACLs to
be processed.

This solves a problem I've been having where the only way I know to
test the ACLs syntax is to restart headscale, and if it fails to start
I need to login via another system and correct the problem, then restart
headscale.

This is the first time I've touched go, so if you ask too much of me in
review I'm likely to be out of my element quickly.  :-)
Comment thread CHANGELOG.md
@kradalby kradalby merged commit f49930c into juanfont:main Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support "configtest" to verify configuration and ACLs.

2 participants