WIP
This commit is contained in:
@@ -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
|
||||
"#
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user