change config dir and env var prefix

This commit is contained in:
Aravinth Manivannan 2021-10-31 22:47:09 +05:30
parent 11dc8acc50
commit a820a5233d
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
1 changed files with 2 additions and 2 deletions

View File

@ -57,9 +57,9 @@ impl Settings {
.expect("Couldn't get the number of CPUs");
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))?;
} else if Path::new(CURRENT_DIR).exists() {
// merging default config from file