首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 互联网 >

检测cdn资料是否同步完成工具(单文件)

2012-11-26 
检测cdn文件是否同步完成工具(单文件)#!/bin/shURL$1result`curl -o /dev/null -s -m 10 --connect-time

检测cdn文件是否同步完成工具(单文件)

#!/bin/shURL=$1result=`curl -o /dev/null -s -m 10 --connect-timeout 10 -w %{http_code}  $URL`test=`echo $result`if [[  "$test" = "200"  ]];then        echo 'cdn sync ok'else        while [ "$test" != "200" ];do                result=`curl -o /dev/null -s -m 10 --connect-timeout 10 -w %{http_code}  $URL`                test=`echo $result`                if [[  "$test" != "200"  ]];then                        sleep 2                        continue                else                        echo 'cdn sync ok!'                fi        donefi
?

热点排行