Create a gist now

Instantly share code, notes, and snippets.

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