mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-30 02:43:05 +00:00
Only load ACLs if a path is present
This commit is contained in:
parent
eabb1ce881
commit
7d46dfe012
1 changed files with 6 additions and 3 deletions
|
@ -121,9 +121,12 @@ func getHeadscaleApp() (*headscale.Headscale, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// We are doing this here, as in the future could be cool to have it also hot-reload
|
// 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 {
|
if viper.GetString("acl_policy_path") != "" {
|
||||||
log.Printf("Could not load the ACL policy: %s", err)
|
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
|
return h, nil
|
||||||
|
|
Loading…
Reference in a new issue