diff --git a/src/config.rs b/src/config.rs index 1042551..dc39d58 100644 --- a/src/config.rs +++ b/src/config.rs @@ -18,7 +18,7 @@ pub struct Config { impl Config { pub(crate) fn create() -> WResult { let mut config_parent = Config::get_parent()?; - config_parent.push("woly.conf"); + config_parent.push("wolz.conf"); let config_file = config_parent; if config_file.exists() { return Config::read_existing_conf(config_file); @@ -104,7 +104,7 @@ impl Config { } fn get_parent() -> WResult { - let config_dir_env_var_name = "WOLY_CONFIG_HOME"; + let config_dir_env_var_name = "WOLZ_CONFIG_HOME"; let config_dir_name = std::env::var(config_dir_env_var_name); if let Ok(config_dir_name) = config_dir_name { let path = PathBuf::from(config_dir_name); @@ -133,7 +133,7 @@ impl Config { return Err(WError::ConfigDirInitError(format!( "Set one of {}, {} or {} environment variable to determine the config directory", - "$WOLY_CONFIG_HOME", "$XDG_CONFIG_HOME", "$HOME" + "$WOLZ_CONFIG_HOME", "$XDG_CONFIG_HOME", "$HOME" ))); } diff --git a/src/main.rs b/src/main.rs index 47af333..5ac7edd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,7 +47,7 @@ fn main() -> WResult<()> { fn print_usage() -> WResult<()> { println!( "{}", - r#"usage: woly COMMAND ARG + r#"usage: wolz COMMAND ARG Options: COMMAND One of `up`, `down` or `daemon` @@ -56,15 +56,15 @@ Options: `daemon` - Runs a daemon. This needs to be running on the target machine that needs to be shutdown ARG Either the mac address of the device or a nickname - specified in woly.conf to lookup the mac. See details + specified in wolz.conf to lookup the mac. See details about config file below. - Eg: woly up aa:bb:cc:dd:ee:ff - Eg: woly down potato + Eg: wolz up aa:bb:cc:dd:ee:ff + Eg: wolz down potato Config file: - Filename woly.conf - Location $WOLY_CONFIG_DIR/woly.conf, then $XDG_CONFIG_DIR/woly.conf, - then $HOME/woly.conf + Filename wolz.conf + Location $WOLZ_CONFIG_DIR/wolz.conf, then $XDG_CONFIG_DIR/wolz.conf,wolz + then $HOME/wolz.conf Format KEY=VALUE one per line without spaces, no comments allowed Example potato=aa:bb:cc:dd:ee:ff