Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "configtest" CLI command. #1230

Merged
merged 2 commits into from
Mar 3, 2023
Merged

Conversation

linsomniac
Copy link
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.  :-)
CHANGELOG.md Show resolved Hide resolved
@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