commit 915d3dc5ca98a20ca0c70b14b11a9708f7a09d4d Author: rlbr Date: Wed Oct 24 00:31:43 2018 -0500 initial commit diff --git a/wol.sh b/wol.sh new file mode 100644 index 0000000..7f82a2e --- /dev/null +++ b/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 \ No newline at end of file