config: use /var/lib/dnswatcher as default data directory
All checks were successful
check / check (push) Successful in 46s
All checks were successful
check / check (push) Successful in 46s
Change the default DATA_DIR from the relative path './data' to the absolute path '/var/lib/dnswatcher', following the FHS convention for application state data. The default is derived from the application name passed to setupViper, so it will always match /var/lib/<appname>. Updated README environment variable table and .env example to reflect the new default. Tests updated accordingly.
This commit is contained in:
@@ -94,7 +94,7 @@ func setupViper(name string) {
|
||||
|
||||
viper.SetDefault("PORT", defaultPort)
|
||||
viper.SetDefault("DEBUG", false)
|
||||
viper.SetDefault("DATA_DIR", "./data")
|
||||
viper.SetDefault("DATA_DIR", "/var/lib/"+name)
|
||||
viper.SetDefault("TARGETS", "")
|
||||
viper.SetDefault("SLACK_WEBHOOK", "")
|
||||
viper.SetDefault("MATTERMOST_WEBHOOK", "")
|
||||
|
||||
Reference in New Issue
Block a user