#!/bin/bash

host="$1"

while ! maxtime 10 ping -c 5 "$host"
do
   sleep 10
done

osascript -e 'tell app "System Events" to display dialog "'"$host is back up"\"