Merge pull request #721 from midoks/dev

简单优化
pull/727/head
Mr Chen 4 weeks ago committed by GitHub
commit 23880fdb91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      plugins/postgresql/class/pg.py
  2. 3
      scripts/install.sh
  3. 3
      scripts/install_dev.sh
  4. 3
      scripts/update.sh
  5. 3
      scripts/update_dev.sh
  6. 6
      web/thisdb/logs.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:

@ -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

@ -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

@ -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

@ -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

@ -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,

Loading…
Cancel
Save