Hey Robin,
I wrote a sample script to run in infinite loop and check the pid if it exists then create an ALIVE_master if not DOWN_master message in a logfile which will be synced to slave server using rsync every 2 mins, on the slave side there is a script to read the log file every 2 mins and see if its down then trigger the application start script if not stay alive.
so far its ok to send a message using log to slave but i want the same to be happend when Slave takes over which I'm not sure how to accomplish.
Please suggest if you have better idea.
I'm using Red Hat Enterprise Linux Server release 7.2 (Maipo) and I prefer to use Bash Script.
Thank you