Skip to content

Instantly share code, notes, and snippets.

Created April 20, 2015 20:35
What would you like to do?
Alert if host is back up
hostup() {
if (( $# != 1 )); then
echo "Usage: hostup HOSTNAME"
until $(which ping) -W1 -c1 ${1} > /dev/null; do sleep 5; done && $(which say) "${1} is up"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment