Update mw.tpl

pull/504/head
Mr Chen 2 years ago
parent ad644c3cf9
commit 71a2b43c06
  1. 5
      scripts/init.d/mw.tpl

@ -231,10 +231,11 @@ mw_update()
mw_update_dev()
{
LOCAL_ADDR=common
ping -c 1 github.com > /dev/null 2>&1
if [ "$?" != "0" ];then
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

Loading…
Cancel
Save