@@ -33,16 +33,16 @@ uci_get_by_type() {
3333
3434# rule update
3535echo $Date : 开始更新规则,请等待... > $LOG_FILE
36- # wget -q --no-check-certificate --timeout=15 https://raw.githubusercontent.com/monokoo/koolshare.github.io/acelan_softcenter_ui/maintain_files/version1 -O /tmp/version1
37- status1=$( curl -w %{http_code} --connect-timeout 10 $url_main /version1 --silent -o /tmp/version1)
38- if [ - z " $status1 " ] || [ " $status1 " == " 404 " ]; then
36+ # /usr/bin/ wget -q --no-check-certificate --timeout=15 https://raw.githubusercontent.com/monokoo/koolshare.github.io/acelan_softcenter_ui/maintain_files/version1 -O /tmp/version1
37+ status1=$( /usr/bin/ curl -w %{http_code} --connect-timeout 10 $url_main /version1 --silent -o /tmp/version1)
38+ if [ " $? " != 0 ] || [ ! -f " /tmp/version1 " ] || [ - z " $status1 " ] || [ " $status1 " != " 200 " ]; then
3939 echo $Date : 无法访问更新接口,请更新接口! >> $LOG_FILE
4040 exit
4141fi
4242online_content=$( cat /tmp/version1 2> /dev/null)
4343if [ -z " $online_content " ]; then
4444 rm -rf /tmp/version1
45- echo $Date : 没有检测到在线版本,可能是访问github有问题,去大陆白名单模式试试吧 ! >> $LOG_FILE
45+ echo $Date : 没有检测到在线版本,可能是访问github有问题! >> $LOG_FILE
4646 exit
4747fi
4848
@@ -57,9 +57,9 @@ if [ "$gfwlist_update" == 1 ]; then
5757 if [ " $version_gfwlist1 " != " $version_gfwlist2 " -o " $md5sum_gfwlist2 " != " $local_md5sum_gfwlist " ]; then
5858 echo $Date : 检测到新版本gfwlist,开始更新... >> $LOG_FILE
5959 echo $Date : 下载gfwlist到临时文件... >> $LOG_FILE
60- # wget --no-check-certificate --timeout=15 -q https://raw.githubusercontent.com/monokoo/koolshare.github.io/acelan_softcenter_ui/maintain_files/gfwlist.conf -O /tmp/gfwlist.conf
61- status2=$( curl -w %{http_code} --connect-timeout 10 $url_main /gfwlist.conf --silent -o /tmp/gfwlist.conf)
62- if [ - z " $status2 " ] || [ " $status2 " == " 404 " ]; then
60+ # /usr/bin/ wget --no-check-certificate --timeout=15 -q https://raw.githubusercontent.com/monokoo/koolshare.github.io/acelan_softcenter_ui/maintain_files/gfwlist.conf -O /tmp/gfwlist.conf
61+ status2=$( /usr/bin/ curl -w %{http_code} --connect-timeout 10 $url_main /gfwlist.conf --silent -o /tmp/gfwlist.conf)
62+ if [ " $? " != 0 ] || [ ! -f " /tmp/gfwlist.conf " ] || [ - z " $status2 " ] || [ " $status2 " != " 200 " ]; then
6363 echo $Date : 无法访问更新接口,请更新接口! >> $LOG_FILE
6464 exit
6565 fi
@@ -94,9 +94,9 @@ if [ "$chnroute_update" == 1 ]; then
9494 if [ " $version_chnroute1 " != " $version_chnroute2 " -o " $md5sum_chnroute2 " != " $local_md5sum_chnroute " ]; then
9595 echo $Date : 检测到新版本chnroute,开始更新... >> $LOG_FILE
9696 echo $Date : 下载chnroute到临时文件... >> $LOG_FILE
97- # wget --no-check-certificate --timeout=15 -q https://raw.githubusercontent.com/monokoo/koolshare.github.io/acelan_softcenter_ui/maintain_files/chnroute.txt -O /tmp/chnroute
98- status3=$( curl -w %{http_code} --connect-timeout 10 $url_main /chnroute.txt --silent -o /tmp/chnroute)
99- if [ -z " $status3 " ] || [ " $status3 " == " 404" ]; then
97+ # /usr/bin/ wget --no-check-certificate --timeout=15 -q https://raw.githubusercontent.com/monokoo/koolshare.github.io/acelan_softcenter_ui/maintain_files/chnroute.txt -O /tmp/chnroute
98+ status3=$( /usr/bin/ curl -w %{http_code} --connect-timeout 10 $url_main /chnroute.txt --silent -o /tmp/chnroute)
99+ if [ " $? " != 0 ] || [ ! -f " /tmp/chnroute " ] || [ -z " $status3 " ] || [ " $status3 " == " 404" ]; then
100100 echo $Date : 无法访问更新接口,请更新接口! >> $LOG_FILE
101101 exit
102102 fi
0 commit comments