提示信息

防止haproxy服务关闭导致keepalived不自动切换

顽主 已关注
  1. #vim /opt/check_haproxy.sh
  2. #!/bin/bash
  3. if [ $(ps -C haproxy --no-header | wc -l) -eq 0 ]; then
  4. /etc/init.d/haproxy start
  5. fi
  6. sleep 2
  7. if [ $(ps -C haproxy --no-header | wc -l) -eq 0 ]; then
  8. /etc/init.d/keepalived stop
  9. fi
顽主 关注 已关注

最近一次登录:2020-05-02 10:07:21   

暂时还没有签名,请关注我或评论我的文章
×
分享到朋友圈