diff --git a/plugins/php/versions/83/install.sh b/plugins/php/versions/83/install.sh index f5912fee8d..372c0ed2e3 100755 --- a/plugins/php/versions/83/install.sh +++ b/plugins/php/versions/83/install.sh @@ -31,17 +31,17 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then # ----------------------------------------------------------------------- # # 中国优化安装 - # cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"") - # LOCAL_ADDR=common - # if [ ! -z "$cn" ];then - # LOCAL_ADDR=cn - # fi - - # if [ "$LOCAL_ADDR" == "cn" ];then - # if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then - # wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.sohu.com/php/php-${version}.tar.xz - # fi - # fi + cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"") + LOCAL_ADDR=common + if [ ! -z "$cn" ];then + LOCAL_ADDR=cn + fi + + if [ "$LOCAL_ADDR" == "cn" ];then + if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then + wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz + fi + fi # ----------------------------------------------------------------------- #