Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. vrrp_script chk_script {
  2. script "/usr/local/bin/failover.sh"
  3. interval 2
  4. weight 2
  5. }
  6.  
  7. vrrp_instance HAInstance {
  8. state BACKUP
  9. interface eth0
  10. virtual_router_id 8
  11. priority 109
  12. advert_int 1
  13. nopreempt
  14. vrrp_unicast_bind 10.10.10.8
  15. vrrp_unicast_peer 10.10.10.9
  16. virtual_ipaddress {
  17. 10.10.10.10/16 dev eth0
  18. }
  19. notify /usr/local/bin/keepalivednotify.sh
  20. track_script {
  21. chk_script weight 20
  22. }
  23. }
  24.  
  25. !/bin/bash
  26. SERVICE='process'
  27. STATUS=$(ps ax | grep -v grep | grep $SERVICE)
  28.  
  29. if [ "$STATUS" != "" ]
  30. then
  31. exit 0
  32. else
  33. exit 1
  34. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement