0
#!/bin/bash
#Name: Cityzen Wang
#Scripts: Check web server every minute.
read -p "Please input websit: " n
curl -x192.168.32.142:80 $n -I > /tmp/test.com 2>/dev/null
a=`grep 200 /tmp/test.com`
if [ -z $a ];then
mail -s "Error" 312903444@qq.com < /tmp/test.com
fi
编辑回复