Add additional locations to look for the config.json file:

/etc/headscale and $HOME/.headscale
This commit is contained in:
Ward Vandewege 2021-04-21 17:33:09 -04:00
parent eac85a31ed
commit a71387f9d2

View file

@ -171,6 +171,8 @@ var enableRouteCmd = &cobra.Command{
func main() { func main() {
viper.SetConfigName("config") viper.SetConfigName("config")
viper.AddConfigPath("/etc/headscale/")
viper.AddConfigPath("$HOME/.headscale")
viper.AddConfigPath(".") viper.AddConfigPath(".")
viper.AutomaticEnv() viper.AutomaticEnv()
err := viper.ReadInConfig() err := viper.ReadInConfig()