From 78d3a091cda237237f2bd331dfcc95372517b559 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 29 Oct 2022 02:46:27 +0800 Subject: [PATCH] =?UTF-8?q?openresty=E5=A2=9E=E5=8A=A0=E6=80=A7=E8=83=BD?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/mw.py | 10 ++- plugins/openresty/index.html | 5 +- plugins/openresty/index.py | 124 +++++++++++++++++++++++++++++- plugins/openresty/js/openresty.js | 77 ++++++++++++++++++- plugins/php/js/php.js | 5 +- 5 files changed, 209 insertions(+), 12 deletions(-) diff --git a/class/core/mw.py b/class/core/mw.py index 6ffbb09d4..deba3fe26 100755 --- a/class/core/mw.py +++ b/class/core/mw.py @@ -411,7 +411,7 @@ def writeFile(filename, str): return False -def backFile(self, file, act=None): +def backFile(file, act=None): """ @name 备份配置文件 @param file 需要备份的文件 @@ -420,10 +420,12 @@ def backFile(self, file, act=None): file_type = "_bak" if act: file_type = "_def" - execShell("/usr/bin/cp -p {0} {1}".format(file, file + file_type)) + # print("cp -p {0} {1}".format(file, file + file_type)) + execShell("cp -p {0} {1}".format(file, file + file_type)) -def restoreFile(self, file, act=None): + +def restoreFile(file, act=None): """ @name 还原配置文件 @param file 需要还原的文件 @@ -432,7 +434,7 @@ def restoreFile(self, file, act=None): file_type = "_bak" if act: file_type = "_def" - execShell("/usr/bin/cp -p {1} {0}".format(file, file + file_type)) + execShell("cp -p {1} {0}".format(file, file + file_type)) def HttpGet(url, timeout=10): diff --git a/plugins/openresty/index.html b/plugins/openresty/index.html index 3142caca3..346d6af0a 100755 --- a/plugins/openresty/index.html +++ b/plugins/openresty/index.html @@ -4,7 +4,8 @@

服务

自启动

配置修改

-

负载状态

+

负载状态

+

性能调整

错误日志

@@ -14,9 +15,7 @@
-