diff --git a/app/command/CleanViteJs.php b/app/command/CleanViteJs.php index a7e0c65..fe05bf6 100644 --- a/app/command/CleanViteJs.php +++ b/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; diff --git a/app/controller/Admin.php b/app/controller/Admin.php index b1d82df..2a7f71d 100644 --- a/app/controller/Admin.php +++ b/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') ?? '未运行'; View::assign('runtime', $runtime); + View::assign('is_user_www', isset($_SERVER['USER']) && $_SERVER['USER'] == 'www'); return view(); } diff --git a/app/script/convert.sh b/app/script/convert.sh index 0014351..dabaa4b 100644 --- a/app/script/convert.sh +++ b/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 diff --git a/app/view/admin/set.html b/app/view/admin/set.html index 8d110e6..4ecc6ba 100644 --- a/app/view/admin/set.html +++ b/app/view/admin/set.html @@ -273,7 +273,7 @@ $("select[name='enbt_type']").change(function(){
使用以下命令可以从宝塔官方获取最新的插件列表并批量下载插件包(增量更新)。
你也可以将此命令添加到crontab以使此云端的插件保持最新,建议1天执行1次。
-
使用命令执行之后,可能会导致 /data 目录下文件权限不对,后台插件列表下载插件覆盖会报错,需要手动循环设置 /data 目录权限。
+ {if $is_user_www}
注:计划任务执行用户必须选择www用户
{/if}
上次运行时间:{$runtime|raw}
php {:app()->getRootPath()}think updateall

diff --git a/install.sql b/install.sql index 01f3724..108c157 100644 --- a/install.sql +++ b/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'); diff --git a/public/install/install_panel.sh b/public/install/install_panel.sh index f03e9ad..f6a5c34 100644 --- a/public/install/install_panel.sh +++ b/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" diff --git a/public/install/src/bt-monitor-2.3.1.zip b/public/install/src/bt-monitor-2.3.2.zip similarity index 98% rename from public/install/src/bt-monitor-2.3.1.zip rename to public/install/src/bt-monitor-2.3.2.zip index e19a34c..ce250d2 100644 Binary files a/public/install/src/bt-monitor-2.3.1.zip and b/public/install/src/bt-monitor-2.3.2.zip differ diff --git a/public/install/src/panel6.zip b/public/install/src/panel6.zip index 85de655..08ff30f 100644 Binary files a/public/install/src/panel6.zip and b/public/install/src/panel6.zip differ diff --git a/public/install/src/panel_7_en.zip b/public/install/src/panel_7_en.zip index 09e4efc..d88a019 100644 Binary files a/public/install/src/panel_7_en.zip and b/public/install/src/panel_7_en.zip differ diff --git a/public/install/update/LinuxPanel-11.0.0.zip b/public/install/update/LinuxPanel-11.1.0.zip similarity index 85% rename from public/install/update/LinuxPanel-11.0.0.zip rename to public/install/update/LinuxPanel-11.1.0.zip index 7c4f47b..5ca89b6 100644 Binary files a/public/install/update/LinuxPanel-11.0.0.zip and b/public/install/update/LinuxPanel-11.1.0.zip differ diff --git a/public/install/update/LinuxPanel-9.6.0.pl b/public/install/update/LinuxPanel-9.6.0.pl deleted file mode 100644 index 05d9e54..0000000 --- a/public/install/update/LinuxPanel-9.6.0.pl +++ /dev/null @@ -1 +0,0 @@ -{"hash": "d869ee4b8bdcfae324c4fdef9ec647db4a1529e7f6890b8cb4693f40b8a24626", "update_time": "1748242787"} \ No newline at end of file diff --git a/public/install/update/LinuxPanel_EN-7.0.21.zip b/public/install/update/LinuxPanel_EN-7.0.25.zip similarity index 88% rename from public/install/update/LinuxPanel_EN-7.0.21.zip rename to public/install/update/LinuxPanel_EN-7.0.25.zip index e8a8399..ff95bcb 100644 Binary files a/public/install/update/LinuxPanel_EN-7.0.21.zip and b/public/install/update/LinuxPanel_EN-7.0.25.zip differ diff --git a/public/install/update6.sh b/public/install/update6.sh index 3e82807..46d46ea 100644 --- a/public/install/update6.sh +++ b/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 diff --git a/wiki/aapanel.md b/wiki/aapanel.md index 494598e..098eb4e 100644 --- a/wiki/aapanel.md +++ b/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属性 diff --git a/wiki/update.md b/wiki/update.md index 8792093..1382321 100644 --- a/wiki/update.md +++ b/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这一行