Open storopoli opened 2 months ago
Maybe we could rely on environment variables
use std::env;
let key = "DEAD_MAN_CONFIG";
match env::var(key) {
Ok(val) => { do_something_with_val(val)},
Err(e) => {do_nothing()},
}
I don't like env vars, I want this to be a CLI argument that you can override.
ENV vars are good for set and forget stuff. I want to be able to run several DMS with different TOML configs.
Instead of running multiple instances of DMS the --config arg can be set as a array of paths to watch and iterate over TOML configs... This could be useful when developing the https://github.com/storopoli/dead-man-switch/issues/31 daemon mode
with some good byte abstraction, all the TOMLS can be tracked and loaded in memory only retrieving the warning time and the path.
Users no more need to fit all the secrets in one toml (if using the way it should be used). Could have several tomls for each secrets
Right now the config is hardcoded to be created/read in the OS-agnostic config dir. We need a CLI argument to override it.
Something like: