标签:nginx检测
检测nginx是否正常,如果不正常则自动重启
#!/bin/bash
nginx=`netstat -tnlp | grep 80 | grep nginx | wc -l`
if [ "$nginx" -gt 0 ];then
echo "Nginx is running..."
else
echo "Nginx is stopped"
/application/nginx/sbin/nginx
fi
本文出自 “激情燃烧的岁月” 博客,请务必保留此出处http://liuzhengwei521.blog.51cto.com/4855442/1771500
标签:nginx检测
原文地址:http://liuzhengwei521.blog.51cto.com/4855442/1771500