Load ACL policy on headscale startup

This commit is contained in:
Juan Font 2021-07-04 13:24:05 +02:00
parent 401e6aec32
commit 202d6b506f
4 changed files with 18 additions and 3 deletions

View file

@ -119,6 +119,13 @@ func getHeadscaleApp() (*headscale.Headscale, error) {
if err != nil {
return nil, err
}
// We are doing this here, as in the future could be cool to have it also hot-reload
err = h.LoadAclPolicy(absPath(viper.GetString("acl_policy_path")))
if err != nil {
log.Printf("Could not load the ACL policy: %s", err)
}
return h, nil
}