feat(脚本): 添加nginx异常处理

pull/534/merge
mack-a 2020-09-18 17:50:02 +08:00
parent 6200d0ab9e
commit 70fdec5574
1 changed files with 5 additions and 1 deletions

View File

@ -357,7 +357,11 @@ handleNginx(){
fi
elif [[ "$1" = "stop" ]] && [[ ! -z `ps -ef|grep -v grep|grep nginx` ]]
then
nginx -s stop
nginx -s stop > /dev/null 2>&1
if [[ ! -z `ps -ef|grep -v grep|grep nginx` ]]
then
ps -ef|grep -v grep|grep nginx|awk '{print $2}'|xargs kill -9
fi
fi
}
# 定时任务更新tls证书