Created
April 26, 2016 21:11
-
-
Save ben-bradley/7d0f22f28cc2b696eae0377bccce1ea4 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/bash | |
TARGET=$1 | |
ping -c 1 -a $TARGET &> /dev/null | |
while [ $? -ne 0 ]; do | |
sleep 2 | |
ping -c 1 -a $TARGET &> /dev/null | |
done | |
ping -c 1 -a $TARGET | |
echo "$TARGET is up!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment