Update mw.tpl

pull/713/head
dami 2 months ago
parent db04b3f98a
commit ed732232f2
  1. 23
      scripts/init.d/mw.tpl

@ -322,17 +322,18 @@ mw_update_venv()
mw_mirror() mw_mirror()
{ {
LOCAL_ADDR=common # LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"") # cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then # if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
LOCAL_ADDR=cn # LOCAL_ADDR=cn
fi # fi
if [ "$LOCAL_ADDR" == "common" ];then # if [ "$LOCAL_ADDR" == "common" ];then
bash <(curl --insecure -sSL https://raw.githubusercontent.com/midoks/change-linux-mirrors/main/change-mirrors.sh) # bash <(curl --insecure -sSL https://raw.githubusercontent.com/midoks/change-linux-mirrors/main/change-mirrors.sh)
else # else
bash <(curl --insecure -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) # bash <(curl -sSL https://linuxmirrors.cn/main.sh)
fi # fi
bash <(curl -sSL https://linuxmirrors.cn/main.sh)
cd ${ROOT_PATH} cd ${ROOT_PATH}
} }

Loading…
Cancel
Save