Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vrrp_script chk_script {
- script "/usr/local/bin/failover.sh"
- interval 2
- weight 2
- }
- vrrp_instance HAInstance {
- state BACKUP
- interface eth0
- virtual_router_id 8
- priority 109
- advert_int 1
- nopreempt
- vrrp_unicast_bind 10.10.10.8
- vrrp_unicast_peer 10.10.10.9
- virtual_ipaddress {
- 10.10.10.10/16 dev eth0
- }
- notify /usr/local/bin/keepalivednotify.sh
- track_script {
- chk_script weight 20
- }
- }
- !/bin/bash
- SERVICE='process'
- STATUS=$(ps ax | grep -v grep | grep $SERVICE)
- if [ "$STATUS" != "" ]
- then
- exit 0
- else
- exit 1
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement