KeepAlive Script

I was looking for a script to monitor and insure that Tomcat was active. I came across this script by Mahesh at https://serverfault.com/questions/608776/how-to-monitor-tomcat-application-and-restart-if-not-running. It can probably be modified to monitor any process you’d like. #!/bin/bash TOMCAT_HOME=/opt/tomcat PUBLIC_IP=`wget http://ipecho.net/plain -O – -q ; echo` EMAIL_BODY=”Hi Admin,\n\n$PUBLIC_IP Tomcat is down at $(date -d “+330 minutes” +”%Y-%m-%d %T”) IST, Please take necessary action.\n\n\nDo …