nginx和keepalive共存亡
2015-10-30 19:16
691 查看
加入nginx宕了,keepalive也跟着自杀
#!/bin/bash
while :
do
nginxpid=`ps -C nginx --no-header |wc -l`
if [ $nginxpid -eq 0 ];then
/etc/init.d/nginx restart
sleep 5
nginxpid=`ps -C nginx --no-header |wc -l`
if [ $nginxpid -eq 0 ];then
/etc/init.d/keepalived stop
fi
fi
sleep 5
done
本文出自 “杜海强” 博客,请务必保留此出处http://dulinux.blog.51cto.com/10803129/1708180
#!/bin/bash
while :
do
nginxpid=`ps -C nginx --no-header |wc -l`
if [ $nginxpid -eq 0 ];then
/etc/init.d/nginx restart
sleep 5
nginxpid=`ps -C nginx --no-header |wc -l`
if [ $nginxpid -eq 0 ];then
/etc/init.d/keepalived stop
fi
fi
sleep 5
done
本文出自 “杜海强” 博客,请务必保留此出处http://dulinux.blog.51cto.com/10803129/1708180
相关文章推荐
- keepalive监控nginx
- /etc/init.d/nginx
- nginx直接访问html的配置
- LNMP环境编译安装centos5x/nginx_1.4/mysql_5.6/php_5.4
- Nginx之location详解
- nginx ssl 部分加密
- nginx负载均衡配置
- nginx代理与负载均衡配置
- Nginx 错误汇总
- Nginx学习及实践
- NGINX引入线程池 性能提升9倍
- 手把手教你认识并搭建Nginx
- nginx源码分析—模块及其初始化(二)
- 解决nginx + lua 上传文件问题
- nginx安装和配置
- Linux环境下Nginx安装及Ubuntu Server 15.0.4尝试安装Nginx
- nginx 配置 性能优化
- nginx源码分析—队列结构ngx_queue_t
- nginx源码分析—链表结构ngx_list_t
- nginx web server 不能正确解析css问题