Browse Source

initial commit

master
Raphael Roberts 7 years ago
commit
915d3dc5ca
  1. 22
      wol.sh

22
wol.sh

@ -0,0 +1,22 @@
IP="192.168.1.120"
MAC="70:8B:CD:A7:07:78"
/usr/sbin/wol -i 192.168.1.255 -p 9 $MAC > /dev/null
ping -c 1 $IP > /dev/null
res=$?
count=0
stime=`date +%s`
while [ $res -ne 0 ]
do
/usr/sbin/wol -i 192.168.1.255 -p 9 $MAC > /dev/null
let count++
ping -c 1 $IP > /dev/null
res=$?
done
etime=`date +%s`
time=`expr $etime - $stime`
echo "Tries: $count"
if [ $count -gt 0 ]
then
echo "Time: $time"
fi
exit
Loading…
Cancel
Save