change config dir and env var prefix
This commit is contained in:
parent
11dc8acc50
commit
a820a5233d
1 changed files with 2 additions and 2 deletions
|
@ -57,9 +57,9 @@ impl Settings {
|
||||||
.expect("Couldn't get the number of CPUs");
|
.expect("Couldn't get the number of CPUs");
|
||||||
|
|
||||||
const CURRENT_DIR: &str = "./config/default.toml";
|
const CURRENT_DIR: &str = "./config/default.toml";
|
||||||
const ETC: &str = "/etc/static-pages/config.toml";
|
const ETC: &str = "/etc/libmedium/config.toml";
|
||||||
|
|
||||||
if let Ok(path) = env::var("ATHENA_CONFIG") {
|
if let Ok(path) = env::var("LIBMEDIUM") {
|
||||||
s.merge(File::with_name(&path))?;
|
s.merge(File::with_name(&path))?;
|
||||||
} else if Path::new(CURRENT_DIR).exists() {
|
} else if Path::new(CURRENT_DIR).exists() {
|
||||||
// merging default config from file
|
// merging default config from file
|
||||||
|
|
Loading…
Reference in a new issue