Created
November 20, 2014 20:53
-
-
Save nixjobin/ac981edf86c87cef7f54 to your computer and use it in GitHub Desktop.
evault agent checker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Author:Jobin Joseph | |
#JobNix.in | |
# Script to Check Availability of Evault Agent on Linux Servers and restart if the service went down. | |
# logs wil be available at /var/log/messages | |
jemail=youremailid@example.com | |
ps aux|grep -v grep |grep buagent | |
if [ $? -ne 0 ] ; then | |
/etc/init.d/vvagent restart | |
echo "buagent was not running-restarted on server `hostname`" | mail -s "[INFO] buagent Restarted" $jemail | |
logger "buagent was not running-restarted" | |
else | |
echo "buagent is running properly" | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment