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

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