ERROR=1
URL="$1"
EMAIL=""
SLEEP="300"
while [ $ERROR -gt 0 ]
do
wget -T 10 -t 1 --spider "$URL";ERROR=$?;sleep $SLEEP;done;mail -s "website is back" $EMAIL < /dev/null
done
ERROR=1
URL="$1"
EMAIL=""
SLEEP="300"
while [ $ERROR -gt 0 ]
do
wget -T 10 -t 1 --spider "$URL";ERROR=$?;sleep $SLEEP;done;mail -s "website is back" $EMAIL < /dev/null
done