From 6e082417128a3b0de55e171683d37a10e8f23cbb Mon Sep 17 00:00:00 2001
From: Nico Rey <reynico@gmail.com>
Date: Wed, 6 Apr 2022 11:05:08 -0300
Subject: [PATCH 1/3] Exit Headscale if ACL policy file cannot be parsed

---
 cmd/headscale/cli/utils.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/headscale/cli/utils.go b/cmd/headscale/cli/utils.go
index 768a9713..992d1254 100644
--- a/cmd/headscale/cli/utils.go
+++ b/cmd/headscale/cli/utils.go
@@ -408,7 +408,7 @@ func getHeadscaleApp() (*headscale.Headscale, error) {
 		aclPath := absPath(viper.GetString("acl_policy_path"))
 		err = app.LoadACLPolicy(aclPath)
 		if err != nil {
-			log.Error().
+			log.Fatal().
 				Str("path", aclPath).
 				Err(err).
 				Msg("Could not load the ACL policy")

From c3324371d6cb6b0dd73f732e86094def4ccf9c21 Mon Sep 17 00:00:00 2001
From: Nico Rey <reynico@gmail.com>
Date: Wed, 6 Apr 2022 18:41:13 -0300
Subject: [PATCH 2/3] Update changelog

---
 CHANGELOG.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index d3aa8d53..65d22955 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,7 +3,7 @@
 ## 0.16.0 (2022-xx-xx)
 
 ### Changes
-
+- Headscale fails to serve if the ACL policy file cannot be parsed [#537](https://github.com/juanfont/headscale/pull/537)
 - Fix labels cardinality error when registering unknown pre-auth key [#519](https://github.com/juanfont/headscale/pull/519)
 
 ## 0.15.0 (2022-03-20)

From fa7ef3df2fa6e982dd1a34771683f842c7d300e5 Mon Sep 17 00:00:00 2001
From: Nico Rey <reynico@gmail.com>
Date: Thu, 7 Apr 2022 15:21:26 -0300
Subject: [PATCH 3/3] make linter happy

---
 CHANGELOG.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 65d22955..c970be23 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
 ## 0.16.0 (2022-xx-xx)
 
 ### Changes
+
 - Headscale fails to serve if the ACL policy file cannot be parsed [#537](https://github.com/juanfont/headscale/pull/537)
 - Fix labels cardinality error when registering unknown pre-auth key [#519](https://github.com/juanfont/headscale/pull/519)