add notify script

This commit is contained in:
Bertrand Gouny
2015-06-16 13:07:17 +02:00
parent 64183ccd88
commit a7a68de0df
5 changed files with 36 additions and 0 deletions
@@ -22,4 +22,6 @@ vrrp_instance vip-1 {
auth_type PASS
auth_pass {{ keepalived_password }}
}
{{ keepalived_notify }}
}
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
TYPE=$1
NAME=$2
STATE=$3
case $STATE in
"MASTER") echo "I'm the MASTER! Whup whup."
exit 0
;;
"BACKUP") "Ok, i'm just a backup, great."
exit 0
;;
"FAULT") echo "Fault, what ?"
exit 0
;;
*) echo "Unknown state"
exit 1
;;
esac