This commit is contained in:
2026-07-09 22:15:26 +05:30
parent 0d9af8f605
commit 3664e70c5d
5 changed files with 54 additions and 40 deletions
+19 -12
View File
@@ -9,9 +9,17 @@ fn main() -> WResult<()> {
return Ok(());
};
let wolz = Wolz::create()?;
wolz.wake_up(&arg_1)?;
Ok(())
match arg_1.as_str() {
"-h" | "--help" => {
print_usage();
return Ok(());
}
_ => {
let wolz = Wolz::create()?;
wolz.wake_up(&arg_1)?;
Ok(())
}
}
}
fn print_usage() {
@@ -20,20 +28,19 @@ fn print_usage() {
r#"usage: woly ARG
Options:
ARG Either the mac address of the device to send the wol magic
packet to, or a nickname specified in woly.conf to lookup
the mac.
Eg: woly aa:bb:cc:dd:ee:ff
Eg: woly potato
where potato is configured in the woly.conf file as
potato=aa:bb:cc:dd:ee:ff
ARG Either the mac address of the device to send the wol magic
packet to, or a nickname specified in woly.conf to lookup
the mac. See details about config file below.
Eg: woly aa:bb:cc:dd:ee:ff
Eg: woly potato
Config file:
Filename woly.conf
Location $WOLY_CONFIG_DIR/woly.conf, then $XDG_CONFIG_DIR/woly.conf,
then $HOME/woly.conf
Format one KEY=VALUE per line without spaces
Example potato=aa:bb:cc:dd:ee:ff
Format KEY=VALUE
one per line without spaces, no comments allowed
Example potato=aa:bb:cc:dd:ee:ff
idly=12:34:23:e2:3d:ff
"#
);