From 4a2570f96a870b6dd1f12a4daef643158583fe7c Mon Sep 17 00:00:00 2001 From: dami Date: Tue, 8 Apr 2025 17:57:38 +0800 Subject: [PATCH 1/5] Update install.sh --- scripts/install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install.sh b/scripts/install.sh index d13c94835..9d6952229 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -45,6 +45,9 @@ elif grep -Eqi "Fedora" /etc/issue || grep -Eqi "Fedora" /etc/*-release; then elif grep -Eqi "Rocky" /etc/issue || grep -Eqi "Rocky" /etc/*-release; then OSNAME='rhel' yum install -y wget curl zip unzip tar crontabs +elif grep -Eqi "Anolis" /etc/issue || grep -Eqi "Anolis" /etc/*-release; then + OSNAME='rhel' + yum install -y wget curl zip unzip tar crontabs elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eqi "AlmaLinux" /etc/*-release; then OSNAME='rhel' yum install -y wget curl zip unzip tar crontabs From 10348168eb6e40a1bb61dd621661001afb1bea13 Mon Sep 17 00:00:00 2001 From: dami Date: Tue, 8 Apr 2025 17:58:35 +0800 Subject: [PATCH 2/5] Update install_dev.sh --- scripts/install_dev.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index cde638325..ea1ae332d 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -50,6 +50,9 @@ elif grep -Eqi "Fedora" /etc/issue || grep -Eqi "Fedora" /etc/*-release; then elif grep -Eqi "Rocky" /etc/issue || grep -Eqi "Rocky" /etc/*-release; then OSNAME='rhel' yum install -y wget zip unzip +elif grep -Eqi "Anolis" /etc/issue || grep -Eqi "Anolis" /etc/*-release; then + OSNAME='rhel' + yum install -y wget curl zip unzip tar crontabs elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eqi "AlmaLinux" /etc/*-release; then OSNAME='rhel' yum install -y wget zip unzip tar From 85da840688b2681b229d7373b7c4a0af05312d9d Mon Sep 17 00:00:00 2001 From: dami Date: Tue, 8 Apr 2025 18:21:53 +0800 Subject: [PATCH 3/5] update --- scripts/update.sh | 3 +++ scripts/update_dev.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/scripts/update.sh b/scripts/update.sh index 57cf80600..0d390a316 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -51,6 +51,9 @@ elif grep -Eqi "Rocky" /etc/issue || grep -Eqi "Rocky" /etc/*-release; then elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eqi "AlmaLinux" /etc/*-release; then OSNAME='rhel' yum install -y wget zip unzip +elif grep -Eqi "Anolis" /etc/issue || grep -Eqi "Anolis" /etc/*-release; then + OSNAME='rhel' + yum install -y wget curl zip unzip tar crontabs elif grep -Eqi "Amazon Linux" /etc/issue || grep -Eqi "Amazon Linux" /etc/*-release; then OSNAME='amazon' yum install -y wget zip unzip diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index 1f8caa7aa..b0b9a3529 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -50,6 +50,9 @@ elif grep -Eqi "Rocky" /etc/issue || grep -Eqi "Rocky" /etc/*-release; then elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eqi "AlmaLinux" /etc/*-release; then OSNAME='rhel' yum install -y wget zip unzip +elif grep -Eqi "Anolis" /etc/issue || grep -Eqi "Anolis" /etc/*-release; then + OSNAME='rhel' + yum install -y wget curl zip unzip tar crontabs elif grep -Eqi "Amazon Linux" /etc/issue || grep -Eqi "Amazon Linux" /etc/*-release; then OSNAME='amazon' yum install -y wget zip unzip From 897e54cb8667b53c3af4a36b335a71f4bf8eb00a Mon Sep 17 00:00:00 2001 From: dami Date: Wed, 9 Apr 2025 11:41:01 +0800 Subject: [PATCH 4/5] Update pg.py --- plugins/postgresql/class/pg.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/postgresql/class/pg.py b/plugins/postgresql/class/pg.py index 4c0f7a127..0bf3b5bef 100755 --- a/plugins/postgresql/class/pg.py +++ b/plugins/postgresql/class/pg.py @@ -7,8 +7,12 @@ import sys import psycopg2 -sys.path.append(os.getcwd() + "/class/core") -import mw +web_dir = os.getcwd() + "/web" +if os.path.exists(web_dir): + sys.path.append(web_dir) + os.chdir(web_dir) + +import core.mw as mw class ORM: From 10628d1c695663782ee95733b66318ba55ad8ea9 Mon Sep 17 00:00:00 2001 From: dami Date: Sat, 12 Apr 2025 13:56:38 +0800 Subject: [PATCH 5/5] Update logs.py --- web/thisdb/logs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/thisdb/logs.py b/web/thisdb/logs.py index 2b1049111..94a73eb90 100644 --- a/web/thisdb/logs.py +++ b/web/thisdb/logs.py @@ -18,13 +18,17 @@ def clearLog(): mw.M('logs').execute("update sqlite_sequence set seq=0 where name='logs'") return True -def addLog(type, log, uid = 1) -> str: +def addLog(type, log, uid = 1) -> bool: ''' 添加日志 :type -> str 类型 (必填) :log -> str 日志内容 (必填) :uid -> int 用户ID ''' + + if log.find("eval") > -1: + return False + add_time = mw.formatDate() insert_data = { 'type':type,