diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index 09e587630..cffcccca8 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -309,18 +309,10 @@ mw_update_dev() echo "与后续版本差异太大,不再提供更新" exit 0 fi - - LOCAL_ADDR=common - cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"") - if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then - LOCAL_ADDR=cn - fi - - if [ "$LOCAL_ADDR" == "common" ];then - curl --insecure -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/update_dev.sh | bash - else - curl --insecure -fsSL https://code.midoks.icu/midoks/mdserver-web/raw/branch/dev/scripts/update_dev.sh | bash - fi + + mw_common_proxy + bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/update_dev.sh") + echo "bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/update_dev.sh")" cd ${PANEL_DIR} }