23.08.03-update
parent
ffd3a04c09
commit
3732e34878
|
@ -13,7 +13,7 @@ get_PIP_URL(){
|
|||
for node in ${nodes[@]};
|
||||
do
|
||||
start=`date +%s.%N`
|
||||
result=`curl -sS --connect-timeout 3 -m 60 $node/0/|grep Links`
|
||||
result=`curl -sS --connect-timeout 15 -m 60 $node/0/|grep Links`
|
||||
if [ "$result" != '' ];then
|
||||
end=`date +%s.%N`
|
||||
start_s=`echo $start | cut -d '.' -f 1`
|
||||
|
|
|
@ -9,6 +9,9 @@ export PATH
|
|||
export LANG=en_US.UTF-8
|
||||
export LANGUAGE=en_US:en
|
||||
|
||||
_REPO_URL='https://git.xinac.net'
|
||||
_BT_REPO_URL=$_REPO_URL'/github/btpanel-v7.7.0/raw/branch/main'
|
||||
|
||||
get_node_url(){
|
||||
nodes=(https://dg2.bt.cn https://download.bt.cn https://ctcc1-node.bt.cn https://cmcc1-node.bt.cn https://ctcc2-node.bt.cn);
|
||||
|
||||
|
@ -24,7 +27,7 @@ get_node_url(){
|
|||
touch $tmp_file2
|
||||
for node in ${nodes[@]};
|
||||
do
|
||||
NODE_CHECK=$(curl --connect-timeout 3 -m 3 2>/dev/null -w "%{http_code} %{time_total}" ${node}/net_test|xargs)
|
||||
NODE_CHECK=$(curl --connect-timeout 15 -m 3 2>/dev/null -w "%{http_code} %{time_total}" ${node}/net_test|xargs)
|
||||
RES=$(echo ${NODE_CHECK}|awk '{print $1}')
|
||||
NODE_STATUS=$(echo ${NODE_CHECK}|awk '{print $2}')
|
||||
TIME_TOTAL=$(echo ${NODE_CHECK}|awk '{print $3 * 1000 - 500 }'|cut -d '.' -f 1)
|
||||
|
@ -108,7 +111,7 @@ send_check(){
|
|||
chmod +x /etc/init.d/bt
|
||||
p_path2=/www/server/panel/class/common.py
|
||||
p_version=$(cat $p_path2|grep "version = "|awk '{print $3}'|tr -cd [0-9.])
|
||||
curl -sS --connect-timeout 3 -m 60 https://www.bt.cn/api/panel/notpro?version=$p_version
|
||||
curl -sS --connect-timeout 15 -m 60 https://www.bt.cn/api/panel/notpro?version=$p_version
|
||||
NODE_URL=""
|
||||
exit 0;
|
||||
}
|
||||
|
@ -141,9 +144,9 @@ if [ -d "/www/server/phpmyadmin/pma" ];then
|
|||
rm -rf /www/server/phpmyadmin/pma
|
||||
EN_CHECK=$(cat /www/server/panel/config/config.json |grep English)
|
||||
if [ "${EN_CHECK}" ];then
|
||||
curl https://download.bt.cn/install/update6_en.sh|bash
|
||||
curl $_BT_REPO_URL/install/update6_en.sh|bash
|
||||
else
|
||||
curl https://download.bt.cn/install/update6.sh|bash
|
||||
curl $_BT_REPO_URL/install/update6.sh|bash
|
||||
fi
|
||||
echo > /www/server/panel/data/restart.pl
|
||||
fi
|
||||
|
|
|
@ -41,7 +41,7 @@ fi
|
|||
|
||||
download_Url=$NODE_URL
|
||||
setup_path=/www
|
||||
version=$(curl -Ss --connect-timeout 5 -m 2 $_BT_REPO_URL/api/panel/get_version)
|
||||
version=$(curl -Ss --connect-timeout 15 -m 2 $_BT_REPO_URL/api/panel/get_version)
|
||||
if [ "$version" = '' ];then
|
||||
version='7.7.0'
|
||||
fi
|
||||
|
@ -49,7 +49,7 @@ armCheck=$(uname -m|grep arm)
|
|||
if [ "${armCheck}" ];then
|
||||
version='7.7.0'
|
||||
fi
|
||||
wget -T 5 -O /tmp/panel.zip $_BT_REPO_URL/install/src/LinuxPanel-7.7.0.zip
|
||||
wget -T 15 -O /tmp/panel.zip $_BT_REPO_URL/install/src/LinuxPanel-7.7.0.zip
|
||||
dsize=$(du -b /tmp/panel.zip|awk '{print $1}')
|
||||
if [ $dsize -lt 10240 ];then
|
||||
echo "获取更新包失败,请稍后更新或联系宝塔运维"
|
||||
|
|
|
@ -41,11 +41,11 @@ fi
|
|||
|
||||
download_Url=$NODE_URL
|
||||
setup_path=/www
|
||||
version=$(curl -Ss --connect-timeout 5 -m 2 https://brandnew.aapanel.com/api/panel/getLatestOfficialVersion)
|
||||
version=$(curl -Ss --connect-timeout 15 -m 2 https://brandnew.aapanel.com/api/panel/getLatestOfficialVersion)
|
||||
if [ "$version" = '' ];then
|
||||
version='6.8.16'
|
||||
fi
|
||||
wget -T 5 -O /tmp/panel.zip $_BT_REPO_URL/install/src/LinuxPanel-7.7.0.zip
|
||||
wget -T 15 -O /tmp/panel.zip $_BT_REPO_URL/install/src/LinuxPanel-7.7.0.zip
|
||||
dsize=$(du -b /tmp/panel.zip|awk '{print $1}')
|
||||
if [ $dsize -lt 10240 ];then
|
||||
echo "Failed to get update package, please update or contact aaPanel Operation"
|
||||
|
|
|
@ -7,7 +7,7 @@ get_Yum_Repo(){
|
|||
for node in ${nodes[@]};
|
||||
do
|
||||
start=$(date +%s.%N)
|
||||
result=$(curl --connect-timeout 5 --head -s -o /dev/null -w %{http_code} ${node})
|
||||
result=$(curl --connect-timeout 15 --head -s -o /dev/null -w %{http_code} ${node})
|
||||
if [ "$result" == "200" ];then
|
||||
end=`date +%s.%N`
|
||||
start_s=`echo $start | cut -d '.' -f 1`
|
||||
|
|
Loading…
Reference in New Issue