产品的质量依赖于过程的质量, 而过程的质量依赖于企业文化和管理! 欢迎大家来到我的小窝~!

checkport自动检测apache端口重启策略

上一篇 / 下一篇  2011-08-26 15:11:30 / 个人分类:apache

set LogFile=system.log

5ia&K)h'xbI D0

rem检测URL

J%v;zCo[X }g7e6~0

set CheckUrl=http://www.baidu.com51Testing软件测试网8SV0Dpi}!kD

rem使用wget下载网页首页文件,并记录日志51Testing软件测试网WT+Ab&F6Px

.\wget -t 3 -T 2 --no-cache -a wget.log -d %CheckUrl% -O .\Index.html51Testing软件测试网 ~Eu)Xb

IF ERRORLEVEL 1 (

7tG2sj C^Mp6Gf%Z'v0

 find "Connection timed out" .\wget.log >NUL51Testing软件测试网fDW8J/J5I S-`'LZX3[]8~

 IF not ERRORLEVEL 1 (

kPt+h0nC VZ^*O0

   set TextLog=Connection timed out

OQ.w'}A@!a;_@0

   call :WriteLog

J\1eIJek~0

   call :RestartWeb

%mo| e:K0

 ) else (51Testing软件测试网V7eu[#z3g5V

   set TextLog=error occurred

NM!~l-i xN,rw0

   call :WriteLog

Ms6X1fK0

   copy /Y index.html "%date:~0,4%%date:~5,2%%date:~8,2% %time:~0,2%%time:~3,2%%time:~6,2%.html"51Testing软件测试网6h&K:Y3H2i'L:n

   copy /Y wget.log "%date:~0,4%%date:~5,2%%date:~8,2% %time:~0,2%%time:~3,2%%time:~6,2%.log"51Testing软件测试网] k"W*o^

   call :RestartWeb

'@.iT)P wEJ{g-[0

 )

+c)l\;B*@e*?g bit0

) else (

DQstG0

 find "newtopbg_logo" .\Index.html >NUL51Testing软件测试网Wmmw'~3X-z M$A

 IF ERRORLEVEL 1 (51Testing软件测试网;~9~NK[b(tV

   set TextLog=apache error51Testing软件测试网7btm2F+g ^*]

   call :WriteLog

4Hm6q\3\$sx0

   call :RestartWeb

i!D4bP(s0

 )

9so8a{(a F1J+`&k|N0

)51Testing软件测试网 K1ofESxB9h3l L


TAG:

 

评分:0

我来说两句

日历

« 2024-04-23  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 50766
  • 日志数: 65
  • 文件数: 1
  • 建立时间: 2010-11-23
  • 更新时间: 2011-10-18

RSS订阅

Open Toolbar