I set up a high availability system with Heartbeat, I wish that when there was a drop in the main cluster and the secondary cluster was activated, Heartbeat start in it and execute a shell script.
Contents of
/etc/ha.d/haresources
master IPaddr::10.0.0.1/24 test.sh
Contents of
/etc/ha.d/ha.cf
autojoin none debugfile /var/log/ha-debug logfile /var/log/ha-log logfacility local0 ucast ens32 10.0.0.3 ucast ens32 10.0.0.2 udpport 694 use_logd yes keepalive 1 deadtime 10 warntime 5 initdead 20 node master node slave auto_failback on
I gave execute permission to the script and put it in the path /etc/init.d/
, but I still could not get it executed through Heartbeat, is this type of procedure possible?