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

检测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
?