Skip to content

Instantly share code, notes, and snippets.

@florianbeer florianbeer/hostup

Created Apr 20, 2015
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
You can’t perform that action at this time.