From 45d4b8a5de6888e36ccaf8a39d0a2cd1fc05bda8 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 11 Jul 2023 16:25:34 +0800 Subject: [PATCH] update --- README.md | 15 ++++++--------- class/core/system_api.py | 10 ++++++++++ scripts/lib.sh | 2 +- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 087230084..57164e2a5 100644 --- a/README.md +++ b/README.md @@ -100,15 +100,12 @@ docker run -itd --name mw-server --privileged=true -p 7200:7200 -p 80:80 -p 443: ``` -### 版本更新 0.15.0 - -* debian12适配。 -* 添加nezha插件。 -* 优化域名ssl保存功能。 -* 修复PHP扩展intl不加载问题(debian/ubuntu)。 -* 修复redhat安装openresty缺少openssl-devel。 -* docker插件-将就能用。 -* tgbot接收和push任务分离。 +### 版本更新 0.15.1 + +* 升级功能优化。 +* 域名伪静态保存优化。 +* 自动同步gitee。 +* nezha保存优化。 ### JSDelivr安装地址 diff --git a/class/core/system_api.py b/class/core/system_api.py index c02669f32..945cc7c90 100755 --- a/class/core/system_api.py +++ b/class/core/system_api.py @@ -755,6 +755,8 @@ class system_api: #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +P_VER=`python3 -V | awk '{print $2}'` + if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate @@ -769,6 +771,14 @@ if [ ! -z "$cn" ];then fi cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt -i $PIPSRC + +P_VER_D=`echo "$P_VER"|awk -F '.' '{print $1}'` +P_VER_M=`echo "$P_VER"|awk -F '.' '{print $2}'` +NEW_P_VER=${P_VER_D}.${P_VER_M} + +if [ -f /www/server/mdserver-web/version/r${NEW_P_VER}.txt ];then + cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/version/r${NEW_P_VER}.txt -i $PIPSRC +fi ''' os.system(update_env) self.restartMw() diff --git a/scripts/lib.sh b/scripts/lib.sh index e1b9c0c4a..0fb075748 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -8,7 +8,7 @@ function version_ge() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" P_VER=`python3 -V | awk '{print $2}'` echo "python:$P_VER" -sleep 3 +sleep 1 curPath=`pwd` rootPath=$(dirname "$curPath")