This commit is contained in:
dami
2026-07-05 00:51:14 +08:00
parent bcaec6b6ee
commit 23af9085a9
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -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'
+2
View File
@@ -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