From de7ea503e52856adf92caa61e5684c60998a3cfa Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 24 Aug 2023 18:03:23 +0800 Subject: [PATCH] update --- plugins/openresty/index.py | 8 ++++++-- scripts/lib.sh | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index cbcdb8232..e8a2c6f3e 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -101,7 +101,7 @@ def getInitDTpl(): def getPidFile(): file = getConf() content = mw.readFile(file) - rep = 'pid\s*(.*)' + rep = 'pid\s*(.*);' tmp = re.search(rep, content) return tmp.groups()[0].strip() @@ -306,7 +306,11 @@ def start(): def stop(): - return restyOp('stop') + r = restyOp('stop') + pid_file = getPidFile() + if os.path.exists(pid_file): + os.remove(pid_file) + return r def restart(): diff --git a/scripts/lib.sh b/scripts/lib.sh index 0fb075748..b9dd41c5b 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -103,6 +103,8 @@ fi pip3 install --upgrade pip -i $PIPSRC pip3 install --upgrade setuptools -i $PIPSRC + +# --no-cache-dir cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt -i $PIPSRC