Created
June 16, 2015 09:03
-
-
Save astail/bf7ee5572dd87ee98e23 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ether-wake -i eth0 xx:xx:xx:xx:xx:xx | |
hostip=192.168.0.xx | |
set -eu | |
i=0 | |
while true | |
do | |
if ping -c 1 $hostip >> /dev/null; then | |
break | |
fi | |
if [ $i -eq 5 ]; then | |
break | |
fi | |
sleep 10s | |
i=`expr $i + 1` | |
echo $i | |
done | |
echo ping ok |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment