Merge pull request #6 from cure/add-standard-config-locations

Add additional locations to look for the config.json file
This commit is contained in:
Juan Font 2021-04-22 00:52:06 +02:00 committed by GitHub
commit 481a9a01f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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()