http 检测是否正常脚本

  1 #!/bin/bash
  2 echo `date +%Y-%m-%d-%H:%M:%S`start wget hanguo index.html >>/root/test.log
  3 wget 112.175.*.*~/
  4 size=`echo $?`
  5 if [ "$size" -ne 0 ];then
  6     echo "http error" | mail -s "hanguo 53 http error " 1550759257*@163.com
  7     echo `date +%Y-%m-%d-%H:%M:%S`down wget hanguo index.hstm error >>/root/test.log
  8 else
  9     echo `date +%Y-%m-%d-%H:%M:%S`down wget hanguo index.html ok >>/root/test.log
 10 fi
 11 rm -rf ~/*.htm*
~                                  

本文出自 “小刚的博客” 博客,谢绝转载!

你可能感兴趣的:(http,脚本,检测脚本)