Browse Source

update

main 3.4.2
flucout 3 weeks ago
parent
commit
56f6a3242b
  1. 14
      app/command/CleanViteJs.php
  2. 1
      app/controller/Admin.php
  3. 6
      app/script/convert.sh
  4. 2
      app/view/admin/set.html
  5. 12
      install.sql
  6. 24
      public/install/install_panel.sh
  7. BIN
      public/install/src/bt-monitor-2.3.2.zip
  8. BIN
      public/install/src/panel6.zip
  9. BIN
      public/install/src/panel_7_en.zip
  10. BIN
      public/install/update/LinuxPanel-11.1.0.zip
  11. 1
      public/install/update/LinuxPanel-9.6.0.pl
  12. BIN
      public/install/update/LinuxPanel_EN-7.0.25.zip
  13. 7
      public/install/update6.sh
  14. 6
      wiki/aapanel.md
  15. 4
      wiki/update.md

14
app/command/CleanViteJs.php

@ -143,10 +143,10 @@ class CleanViteJs extends Command
if($code){
$file = str_replace($code, '{}', $file);
}
$file = preg_replace('!\w+\(\(\(\)=>"calc"===\w+\.\w+\.type\)\)!', '!1', $file);
$file = preg_replace('!\w+\(\(\(\)=>"input"===\w+\.\w+\.type\)\)!', '!1', $file);
$file = preg_replace('!\w+\(\(function\(\)\{return"calc"===\w+\.\w+\.type\}\)\)!', '!1', $file);
$file = preg_replace('!\w+\(\(function\(\)\{return"input"===\w+\.\w+\.type\}\)\)!', '!1', $file);
$file = preg_replace('!computed\(\(\)=>"calc"===\w+\.\w+\.type\)!', '!1', $file);
$file = preg_replace('!computed\(\(\)=>"input"===\w+\.\w+\.type\)!', '!1', $file);
$file = preg_replace('!computed\(function\(\)\{return"calc"===\w+\.\w+\.type\}\)!', '!1', $file);
$file = preg_replace('!computed\(function\(\)\{return"input"===\w+\.\w+\.type\}\)!', '!1', $file);
$code = $this->getExtendCode($file, '"自动部署"', 2);
if($code){
$file = str_replace($code, '', $file);
@ -201,8 +201,6 @@ class CleanViteJs extends Command
if(strpos($file, '"商用SSL"')!==false){ //ssl
$code = $this->getExtendFunction($file, '"商用SSL"', '{', '}');
$file = str_replace($code, '', $file);
$code = $this->getExtendFunction($file, '"测试证书"', '{', '}');
$file = str_replace($code, '', $file);
$code = $this->getExtendCode($file, ',"联系客服"', 2, '[', ']');
if($code){
$file = str_replace($code, '[]', $file);
@ -249,12 +247,12 @@ class CleanViteJs extends Command
$flag = true;
}
}
$code = $this->getExtendCode($file, '("需求反馈")', 1, '[', ']');
$code = $this->getExtendCode($file, '("需求反馈",-1)', 1, '[', ']');
if($code){
$file = str_replace($code, '[]', $file);
$flag = true;
}
$code = $this->getExtendCode($file, '(" 需求反馈 ")', 1, '[', ']');
$code = $this->getExtendCode($file, '(" 需求反馈 ",-1)', 1, '[', ']');
if($code && strpos($filepath, 'vue_vue_type_') === false){
$file = str_replace($code, '[]', $file);
$flag = true;

1
app/controller/Admin.php

@ -100,6 +100,7 @@ class Admin extends BaseController
View::assign('conf', config('sys'));
$runtime = Db::name('config')->where('key','runtime')->value('value') ?? '<font color="red">未运行</font>';
View::assign('runtime', $runtime);
View::assign('is_user_www', isset($_SERVER['USER']) && $_SERVER['USER'] == 'www');
return view();
}

6
app/script/convert.sh

@ -1,9 +1,9 @@
#!/bin/bash
Linux_Version="11.0.0"
Linux_Version="11.1.0"
Windows_Version="8.2.2"
Aapanel_Version="7.0.21"
Btm_Version="2.3.1"
Aapanel_Version="7.0.25"
Btm_Version="2.3.2"
FILES=(
public/install/src/panel6.zip

2
app/view/admin/set.html

@ -273,7 +273,7 @@ $("select[name='enbt_type']").change(function(){
<div class="panel-body">
<form onsubmit="return saveSetting(this)" method="post" class="form" role="form">
<div class="alert alert-info">使用以下命令可以从宝塔官方获取最新的插件列表并批量下载插件包(增量更新)。<br/>你也可以将此命令添加到crontab以使此云端的插件保持最新,建议1天执行1次。</div>
<div class="alert alert-danger">使用命令执行之后,可能会导致 /data 目录下文件权限不对,后台插件列表下载插件覆盖会报错,需要手动循环设置 /data 目录权限。</div>
{if $is_user_www}<div class="alert alert-danger">注:计划任务执行用户必须选择www用户</div>{/if}
<div class="alert alert-warning">上次运行时间:{$runtime|raw}</div>
<div class="list-group-item">php {:app()->getRootPath()}think updateall</div><br/>
</form>

12
install.sql

@ -12,18 +12,18 @@ INSERT INTO `cloud_config` (`key`, `value`) VALUES
('bt_key', ''),
('whitelist', '0'),
('download_page', '1'),
('new_version', '11.0.0'),
('new_version', '11.1.0'),
('update_msg', '暂无更新日志'),
('update_date', '2025-07-24'),
('update_date', '2025-09-21'),
('new_version_win', '8.2.2'),
('update_msg_win', '暂无更新日志'),
('update_date_win', '2024-12-30'),
('new_version_en', '7.0.21'),
('new_version_en', '7.0.25'),
('update_msg_en', '暂无更新日志'),
('update_date_en', '2025-07-22'),
('new_version_btm', '2.3.0'),
('update_date_en', '2025-09-10'),
('new_version_btm', '2.3.2'),
('update_msg_btm', '暂无更新日志'),
('update_date_btm', '2024-04-24'),
('update_date_btm', '2025-08-12'),
('updateall_type', '0'),
('syskey', 'UqP94LtI8eWAIgCP');

24
public/install/install_panel.sh

@ -316,6 +316,21 @@ Auto_Swap()
echo "$swapFile swap swap defaults 0 0" >> /etc/fstab
swap=`free |grep Swap|awk '{print $2}'`
if [ $swap -gt 1 ];then
KERNEL_MAJOR_VERSION=$(uname -r | cut -d '-' -f1 | awk -F. '{print $1}')
KERNEL_MINOR_VERSION=$(uname -r | cut -d '-' -f1 | awk -F. '{print $2}')
if [ -f "/etc/sysctl.conf" ]; then
sed -i "/vm.swappiness/d" /etc/sysctl.conf
fi
if [ "$KERNEL_MAJOR_VERSION" -lt 3 ]; then
sysctl -w vm.swappiness=1
echo "vm.swappiness=1" >> /etc/sysctl.conf
elif [ "$KERNEL_MAJOR_VERSION" = "3" ] && [ "$KERNEL_MINOR_VERSION" -lt 5 ]; then
sysctl -w vm.swappiness=1
echo "vm.swappiness=1" >> /etc/sysctl.conf
else
sysctl -w vm.swappiness=0
echo "vm.swappiness=0" >> /etc/sysctl.conf
fi
echo "Swap total sizse: $swap";
return;
fi
@ -569,7 +584,7 @@ Install_RPM_Pack(){
#尝试同步时间(从bt.cn)
echo 'Synchronizing system time...'
getBtTime=$(curl -sS --connect-timeout 3 -m 60 http://www.bt.cn/api/index/get_time)
getBtTime=$(curl -sS --connect-timeout 3 -m 60 https://www.bt.cn/api/index/get_time)
if [ "${getBtTime}" ];then
date -s "$(date -d @$getBtTime +"%Y-%m-%d %H:%M:%S")"
fi
@ -1060,6 +1075,7 @@ Install_Bt(){
wget -O /www/server/panel/init.sh ${download_Url}/install/src/bt7.init -T 15
wget -O /www/server/panel/data/softList.conf ${download_Url}/install/conf/softListtls10.conf
rm -rf /www/server/panel/plugin/webssh/
rm -f /www/server/panel/class/*.so
if [ ! -f /www/server/panel/data/not_workorder.pl ]; then
echo "True" > /www/server/panel/data/not_workorder.pl
@ -1439,6 +1455,12 @@ else
HTTP_S="http"
fi
echo "安装基础网站流量统计程序..."
wget -O site_new_total.sh ${download_Url}/site_total/install.sh &> /dev/null
bash site_new_total.sh &> /dev/null
rm -f site_new_total.sh
echo "安装基础网站流量统计程序完成"
echo > /www/server/panel/data/bind.pl
echo -e "=================================================================="
echo -e "\033[32mCongratulations! Installed successfully!\033[0m"

BIN
public/install/src/bt-monitor-2.3.1.zip → public/install/src/bt-monitor-2.3.2.zip

BIN
public/install/src/panel6.zip

BIN
public/install/src/panel_7_en.zip

BIN
public/install/update/LinuxPanel-11.0.0.zip → public/install/update/LinuxPanel-11.1.0.zip

1
public/install/update/LinuxPanel-9.6.0.pl

@ -1 +0,0 @@
{"hash": "d869ee4b8bdcfae324c4fdef9ec647db4a1529e7f6890b8cb4693f40b8a24626", "update_time": "1748242787"}

BIN
public/install/update/LinuxPanel_EN-7.0.21.zip → public/install/update/LinuxPanel_EN-7.0.25.zip

7
public/install/update6.sh

@ -237,6 +237,13 @@ fi
echo "修复面板依赖完成!"
echo "==========================================="
echo "安装基础网站流量统计程序..."
wget -O site_new_total.sh ${download_Url}/site_total/install.sh &> /dev/null
bash site_new_total.sh &> /dev/null
rm -f site_new_total.sh
echo "安装基础网站流量统计程序完成"
RE_UPDATE=$(cat /www/server/panel/data/db/update)
if [ "$RE_UPDATE" -ge "4" ];then
echo "2" > /www/server/panel/data/db/update

6
wiki/aapanel.md

@ -78,6 +78,8 @@
- 去除无用的定时任务:task.py 文件 删除以下几行
"check_site_monitor": check_site_monitor,
"update_software_list": update_software_list,
"malicious_file_scanning": malicious_file_scanning,
@ -100,7 +102,7 @@
- [可选]去除各种计算题:将bt.js里面的内容复制到 BTPanel/static/vite/oldjs/public_backup.js 末尾
- [可选]去除创建网站自动创建的垃圾文件:在class/panelSite.py,分别删除
- [可选]去除创建网站自动创建的垃圾文件:在class/panelSite.py、class_v2/panel_site_v2.py,分别删除
htaccess = self.sitePath + '/.htaccess'
@ -110,7 +112,7 @@
这3行及分别接下来的4行代码
- [可选]关闭未绑定域名提示页面:在class/panelSite.py,root /www/server/nginx/html改成return 400
- [可选]关闭未绑定域名提示页面:在class/panelSite.py、class_v2/panel_site_v2.py,root /www/server/nginx/html改成return 400
- [可选]上传文件默认选中覆盖,在BTPanel/static/vite/oldjs/upload-drog.js,id="all_operation"加checked属性

4
wiki/update.md

@ -113,6 +113,8 @@
"update_software_list": self.update_software_list,
"get_view_title_file": self.get_view_title_file,
PluginLoader.daemon_panel()
check_node_status()
@ -137,6 +139,8 @@
这3行及分别接下来的4行代码
def get_view_title_content(self, get): 下面加上 return public.returnMsg(True, '')
- [可选]关闭未绑定域名提示页面:在class/panelSite.py,root /www/server/nginx/html改成return 400
- [可选]关闭自动生成访问日志:在 BTPanel/\_\_init\_\_.py 删除public.write_request_log这一行

Loading…
Cancel
Save