From 23af9085a9d1fd68342d965dcdbd6cd114005b44 Mon Sep 17 00:00:00 2001 From: dami Date: Sun, 5 Jul 2026 00:51:14 +0800 Subject: [PATCH] update --- plugins/openresty/index.py | 2 ++ plugins/openresty/init.d/nginx.tpl | 2 ++ 2 files changed, 4 insertions(+) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index 78f677831..91ca473d0 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -281,6 +281,7 @@ def status(): return 'start' +# ps -ef|grep nginx|awk '{print $2}'|xargs kill def restyOp(method): file = initDreplace() @@ -292,6 +293,7 @@ def restyOp(method): current_os = mw.getOs() if current_os == "darwin": + # print(file + ' ' + method) data = mw.execShell(file + ' ' + method) if data[1] == '': return 'ok' diff --git a/plugins/openresty/init.d/nginx.tpl b/plugins/openresty/init.d/nginx.tpl index d773f931a..ebc545638 100644 --- a/plugins/openresty/init.d/nginx.tpl +++ b/plugins/openresty/init.d/nginx.tpl @@ -49,10 +49,12 @@ case "$1" in mPID=`cat $PIDFILE` isStart=`ps ax | awk '{ print $1 }' | grep -e "^${mPID}$"` if [ "$isStart" = '' ];then + ps -ef|grep nginx|grep -v grep |awk '{print $2}'| xargs kill echo "$NAME is not running." exit 1 fi else + ps -ef|grep nginx|grep -v grep |awk '{print $2}'| xargs kill echo "$NAME is not running." exit 1 fi