Browse Source

update

tags/1.8.5 1.8.5
flucont 2 years ago
parent
commit
0bf1aa2260
  1. 4
      app/script/convert.sh
  2. 8
      install.sql
  3. 29
      public/install/install_6.0.sh
  4. 8
      public/install/install_btmonitor.sh
  5. BIN
      public/install/src/bt-monitor-2.1.7.zip
  6. BIN
      public/install/src/panel6.zip
  7. BIN
      public/install/update/LinuxPanel-7.9.10.zip
  8. 11
      public/install/update6.sh
  9. 15
      wiki/btmonitor.md
  10. 16
      wiki/files/linux/PluginLoader.py
  11. 6
      wiki/update.md

4
app/script/convert.sh

@ -1,8 +1,8 @@
#!/bin/bash
Linux_Version="7.9.9"
Linux_Version="7.9.10"
Windows_Version="7.8.0"
Btm_Version="2.1.1"
Btm_Version="2.1.7"
FILES=(
public/install/src/panel6.zip

8
install.sql

@ -12,15 +12,15 @@ INSERT INTO `cloud_config` (`key`, `value`) VALUES
('bt_key', ''),
('whitelist', '0'),
('download_page', '1'),
('new_version', '7.9.9'),
('new_version', '7.9.10'),
('update_msg', '暂无更新日志'),
('update_date', '2023-04-07'),
('update_date', '2023-05-09'),
('new_version_win', '7.8.0'),
('update_msg_win', '暂无更新日志'),
('update_date_win', '2022-12-08'),
('new_version_btm', '2.1.1'),
('new_version_btm', '2.1.7'),
('update_msg_btm', '暂无更新日志'),
('update_date_btm', '2023-03-31'),
('update_date_btm', '2023-05-18'),
('updateall_type', '0'),
('syskey', 'UqP94LtI8eWAIgCP');

29
public/install/install_6.0.sh

@ -307,6 +307,15 @@ Install_RPM_Pack(){
echo "exclude=httpd nginx php mysql mairadb python-psutil python2-psutil" >> $yumPath
fi
if [ -f "/etc/redhat-release" ] && [ $(cat /etc/os-release|grep PLATFORM_ID|grep -oE "el8") ];then
yum config-manager --set-enabled powertools
yum config-manager --set-enabled PowerTools
fi
if [ -f "/etc/redhat-release" ] && [ $(cat /etc/os-release|grep PLATFORM_ID|grep -oE "el9") ];then
dnf config-manager --set-enabled crb -y
fi
#SYS_TYPE=$(uname -a|grep x86_64)
#yumBaseUrl=$(cat /etc/yum.repos.d/CentOS-Base.repo|grep baseurl=http|cut -d '=' -f 2|cut -d '$' -f 1|head -n 1)
#[ "${yumBaseUrl}" ] && checkYumRepo=$(curl --connect-timeout 5 --head -s -o /dev/null -w %{http_code} ${yumBaseUrl})
@ -524,7 +533,7 @@ Install_Python_Lib(){
return
fi
py_version="3.7.8"
py_version="3.7.16"
mkdir -p $pyenv_path
echo "True" > /www/disk.pl
if [ ! -w /www/disk.pl ];then
@ -601,7 +610,7 @@ Install_Python_Lib(){
cd ~
rm -rf $python_src_path
wget -O $pyenv_path/pyenv/bin/activate $download_Url/install/pyenv/activate.panel -T 5
wget -O $pyenv_path/pyenv/pip.txt $download_Url/install/pyenv/pip-3.7.8.txt -T 5
wget -O $pyenv_path/pyenv/pip.txt $download_Url/install/pyenv/pip-3.7.16.txt -T 5
ln -sf $pyenv_path/pyenv/bin/pip3.7 $pyenv_path/pyenv/bin/pip
ln -sf $pyenv_path/pyenv/bin/python3.7 $pyenv_path/pyenv/bin/python
ln -sf $pyenv_path/pyenv/bin/pip3.7 /usr/bin/btpip
@ -611,8 +620,24 @@ Install_Python_Lib(){
$pyenv_path/pyenv/bin/pip install -U setuptools==65.5.0
$pyenv_path/pyenv/bin/pip install -U wheel==0.34.2
$pyenv_path/pyenv/bin/pip install -r $pyenv_path/pyenv/pip.txt
wget -O pip-packs.txt $download_Url/install/pyenv/pip-packs.txt
PIP_PACKS=$(cat pip-packs.txt)
for P_PACK in ${PIP_PACKS};
do
btpip show ${P_PACK} > /dev/null 2>&1
if [ "$?" == "1" ];then
btpip install ${P_PACK}
fi
done
rm -f pip-packs.txt
source $pyenv_path/pyenv/bin/activate
btpip install psutil
btpip install gevent
is_gevent=$($python_bin -m gevent 2>&1|grep -oE package)
is_psutil=$($python_bin -m psutil 2>&1|grep -oE package)
if [ "${is_gevent}" != "${is_psutil}" ];then

8
public/install/install_btmonitor.sh

@ -213,6 +213,8 @@ Install_Python_Lib(){
$pyenv_path/pyenv/bin/pip install cachelib
$pyenv_path/pyenv/bin/pip install py7zr
$pyenv_path/pyenv/bin/pip install backports.lzma
$pyenv_path/pyenv/bin/pip install pandas
$pyenv_path/pyenv/bin/pip install msgpack
fi
source $pyenv_path/pyenv/bin/activate
chmod -R 700 $pyenv_path/pyenv/bin
@ -270,6 +272,8 @@ Install_Python_Lib(){
$pyenv_path/pyenv/bin/pip install cachelib
$pyenv_path/pyenv/bin/pip install py7zr
$pyenv_path/pyenv/bin/pip install backports.lzma
$pyenv_path/pyenv/bin/pip install pandas
$pyenv_path/pyenv/bin/pip install msgpack
if [ ! -f $pyenv_path/pyenv/bin/python ];then
rm -f $pyenv_file
Red_Error "ERROR: Install python env fielded." "ERROR: 下载堡塔云监控主控端运行环境失败,请尝试重新安装!"
@ -325,6 +329,8 @@ Install_Python_Lib(){
$pyenv_path/pyenv/bin/pip install cachelib
$pyenv_path/pyenv/bin/pip install py7zr
$pyenv_path/pyenv/bin/pip install backports.lzma
$pyenv_path/pyenv/bin/pip install pandas
$pyenv_path/pyenv/bin/pip install msgpack
source $pyenv_path/pyenv/bin/activate
is_gevent=$($python_bin -m gevent 2>&1|grep -oE package)
@ -360,7 +366,7 @@ EOF
sleep 1
fi
version="2.0.8"
version="2.1.7"
file_name="bt-monitor"
agent_src="bt-monitor.zip"

BIN
public/install/src/bt-monitor-2.1.1.zip → public/install/src/bt-monitor-2.1.7.zip

BIN
public/install/src/panel6.zip

BIN
public/install/update/LinuxPanel-7.9.9.zip → public/install/update/LinuxPanel-7.9.10.zip

11
public/install/update6.sh

@ -48,6 +48,10 @@ armCheck=$(uname -m|grep arm)
if [ "${armCheck}" ];then
version='7.7.0'
fi
if [ "$1" ];then
version=$1
fi
wget -T 5 -O /tmp/panel.zip $Btapi_Url/install/update/LinuxPanel-${version}.zip
dsize=$(du -b /tmp/panel.zip|awk '{print $1}')
if [ $dsize -lt 10240 ];then
@ -69,10 +73,11 @@ rm -f /www/server/panel/class/*.pyc
#pip install itsdangerous==0.24
pip_list=$($mypip list)
request_v=$(echo "$pip_list"|grep requests)
if [ "$request_v" = "" ];then
$mypip install requests
request_v=$(btpip list 2>/dev/null|grep "requests "|awk '{print $2}'|cut -d '.' -f 2)
if [ "$request_v" = "" ] || [ "${request_v}" -gt "28" ];then
$mypip install requests==2.27.1
fi
openssl_v=$(echo "$pip_list"|grep pyOpenSSL)
if [ "$openssl_v" = "" ];then
$mypip install pyOpenSSL

15
wiki/btmonitor.md

@ -4,7 +4,7 @@
安装包下载链接:http://download.bt.cn/install/src/bt-monitor-版本号.zip
- 删除core/include/c_loader/PluginLoader.so,将btmonitor/PluginLoader.py复制到这个文件夹
- 删除core/include/c_loader/PluginLoader.so,sqlite_server/PluginLoader.so,将btmonitor/PluginLoader.py复制到这个文件夹
- 批量解密源码:执行 php think decrypt all <源码根目录>
@ -28,7 +28,7 @@
def write_request_log(reques = None): 这一行下面加上 return
- core/basic_monitor.py
- core/include/basic_monitor.py
在 def report_module_logs(self, force=False): 这一行下面加上 return
@ -40,5 +40,14 @@
- init.sh https://download.bt.cn => http://www.example.com
- BT-MONITOR 取消第一个CreateSSL方法定义的注释,删除第二个CreateSSL方法定义
- BT-MONITOR
```python
def CreateSSL():
```
这一行下面加上
```python
return CreateSSL_offline()
```

16
wiki/files/linux/PluginLoader.py

@ -3,7 +3,7 @@ import public,os,sys,json
#获取插件列表(0/1)
def get_plugin_list(force = 0):
api_root_url = 'https://api.bt.cn'
api_root_url = 'http://www.example.com'
api_url = api_root_url+ '/panel/get_plugin_list'
cache_file = 'data/plugin_list.json'
@ -120,3 +120,17 @@ def path_check(path):
if i in list:
return False
return True
#数据加密
def db_encrypt(data):
result = {}
result['status'] = True
result['msg'] = data
return result
#数据解密
def db_decrypt(data):
result = {}
result['status'] = True
result['msg'] = data
return result

6
wiki/update.md

@ -71,12 +71,8 @@
- 去除无用的定时任务:task.py 文件 删除以下几行
"update_software_list": update_software_list,
"check_panel_msg": check_panel_msg,
PluginLoader.daemon_panel()
- 去除WebRTC连接:BTPanel/static/js/public.js 删除stun.start();这一行
- 去除首页广告:BTPanel/static/js/index.js 文件删除最下面index.recommend_paid_version()这一行
@ -105,6 +101,8 @@
- [可选]关闭自动生成访问日志:在 BTPanel/\_\_init\_\_.py 删除public.write_request_log()这一行
- [可选]删除小图标广告:在BTPanel/static/js/site.js,删除“WAF防火墙,保护网站安全”对应的html标签,files.js,删除“开启保护,文件无法编辑”对应的html标签
解压安装包panel6.zip,将更新包改好的文件覆盖到里面,然后重新打包,即可更新安装包。(

Loading…
Cancel
Save