added ~/bin to this repo and steam launcher helder script to mitigate some errors
This commit is contained in:
parent
df1ee3ed4d
commit
e3feb62c51
9 changed files with 92 additions and 3 deletions
19
bin/nas-boot.sh
Executable file
19
bin/nas-boot.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Needs NAS_HOST and NAS_MAC defined in ~/.config.sh
|
||||
|
||||
source ~/.config.sh
|
||||
|
||||
/usr/bin/zenity --question --text "Do You really want to boot your NAS device?"
|
||||
case $? in
|
||||
0)
|
||||
ping -c 1 $NAS_HOST
|
||||
VALUE=$?
|
||||
if [ $VALUE == 0 ]; then
|
||||
/usr/bin/zenity --info --icon-name=error --text "Boot command failed: Device already up!"
|
||||
elif [ $VALUE == 1 ]; then
|
||||
/usr/bin/wol $NAS_MAC
|
||||
/usr/bin/zenity --info --text "Boot command sent to NAS device."
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
Loading…
Add table
Add a link
Reference in a new issue