This commit is contained in:
ofreax 2015-08-03 19:54:27 +02:00
parent 6b09984838
commit 39da36944c
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
KEEPALIVED_INTERFACE: eth0 KEEPALIVED_INTERFACE: eth0
KEEPALIVED_PASSWORD: d0cker KEEPALIVED_PASSWORD: d0cker
# for electing MASTER, highest priority wins. # For electing MASTER, highest priority wins.
# to be MASTER, make 50 more than other machines # to be MASTER, make 50 more than other machines
KEEPALIVED_PRIORITY: 150 KEEPALIVED_PRIORITY: 150

View File

@ -16,16 +16,16 @@ NAME=$2
STATE=$3 STATE=$3
case $STATE in case $STATE in
"MASTER") logger "I'm the MASTER! Whup whup." "MASTER") logger -s -t keepalived-notify "I'm the MASTER! Whup whup."
exit 0 exit 0
;; ;;
"BACKUP") logger "Ok, i'm just a backup, great." "BACKUP") logger -s -t keepalived-notify "Ok, i'm just a backup, great."
exit 0 exit 0
;; ;;
"FAULT") logger "Fault, what ?" "FAULT") logger -s -t keepalived-notify "Fault, what ?"
exit 0 exit 0
;; ;;
*) logger "Unknown state" *) logger -s -t keepalived-notify "Unknown state"
exit 1 exit 1
;; ;;
esac esac