fix: env var prefix, set to LPFORMS
This commit is contained in:
parent
e1386fd6c7
commit
bc1f75e650
1 changed files with 3 additions and 3 deletions
|
@ -78,9 +78,9 @@ impl Settings {
|
||||||
let mut s = Config::new();
|
let mut s = Config::new();
|
||||||
|
|
||||||
const CURRENT_DIR: &str = "./config/default.toml";
|
const CURRENT_DIR: &str = "./config/default.toml";
|
||||||
const ETC: &str = "/etc/rwook/config.toml";
|
const ETC: &str = "/etc/lpforms/config.toml";
|
||||||
|
|
||||||
if let Ok(path) = env::var("RWHOOK_CONFIG") {
|
if let Ok(path) = env::var("LPFORMS") {
|
||||||
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
|
||||||
|
@ -91,7 +91,7 @@ impl Settings {
|
||||||
log::warn!("configuration file not found");
|
log::warn!("configuration file not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
s.merge(Environment::with_prefix("RWHOOK").separator("_"))?;
|
s.merge(Environment::with_prefix("LPFORMS").separator("_"))?;
|
||||||
|
|
||||||
check_url(&s);
|
check_url(&s);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue