adding /usr/local/etc/seaweedfs for bsd style config search path
related to https://reviews.freebsd.org/D27391
This commit is contained in:
@@ -91,7 +91,7 @@ var cmdFiler = &Command{
|
|||||||
//return a json format subdirectory and files listing
|
//return a json format subdirectory and files listing
|
||||||
GET /path/to/
|
GET /path/to/
|
||||||
|
|
||||||
The configuration file "filer.toml" is read from ".", "$HOME/.seaweedfs/", or "/etc/seaweedfs/", in that order.
|
The configuration file "filer.toml" is read from ".", "$HOME/.seaweedfs/", "/usr/local/etc/seaweedfs/", or "/etc/seaweedfs/", in that order.
|
||||||
|
|
||||||
The example filer.toml configuration file can be generated by "weed scaffold -config=filer"
|
The example filer.toml configuration file can be generated by "weed scaffold -config=filer"
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ var cmdMaster = &Command{
|
|||||||
Short: "start a master server",
|
Short: "start a master server",
|
||||||
Long: `start a master server to provide volume=>location mapping service and sequence number of file ids
|
Long: `start a master server to provide volume=>location mapping service and sequence number of file ids
|
||||||
|
|
||||||
The configuration file "security.toml" is read from ".", "$HOME/.seaweedfs/", or "/etc/seaweedfs/", in that order.
|
The configuration file "security.toml" is read from ".", "$HOME/.seaweedfs/", "/usr/local/etc/seaweedfs/", or "/etc/seaweedfs/", in that order.
|
||||||
|
|
||||||
The example security.toml configuration file can be generated by "weed scaffold -config=security"
|
The example security.toml configuration file can be generated by "weed scaffold -config=security"
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ func LoadConfiguration(configFileName string, required bool) (loaded bool) {
|
|||||||
viper.SetConfigName(configFileName) // name of config file (without extension)
|
viper.SetConfigName(configFileName) // name of config file (without extension)
|
||||||
viper.AddConfigPath(".") // optionally look for config in the working directory
|
viper.AddConfigPath(".") // optionally look for config in the working directory
|
||||||
viper.AddConfigPath("$HOME/.seaweedfs") // call multiple times to add many search paths
|
viper.AddConfigPath("$HOME/.seaweedfs") // call multiple times to add many search paths
|
||||||
|
viper.AddConfigPath("/usr/local/etc/seaweedfs/") // search path for bsd-style config directory in
|
||||||
viper.AddConfigPath("/etc/seaweedfs/") // path to look for the config file in
|
viper.AddConfigPath("/etc/seaweedfs/") // path to look for the config file in
|
||||||
|
|
||||||
glog.V(1).Infof("Reading %s.toml from %s", configFileName, viper.ConfigFileUsed())
|
glog.V(1).Infof("Reading %s.toml from %s", configFileName, viper.ConfigFileUsed())
|
||||||
|
|||||||
Reference in New Issue
Block a user