#!/bin/sh
tomcatID=$(ps -ef|grep *** |grep -w '***'|grep -v 'grep'|awk '{print $2}')
if [[ $tomcatID ]]
then
echo "*** is running."
else
echo "*** is down!"
echo "cd /home/apache-tomcat-7.0.63/bin to start tomcat!"|mail -s "你要发的提示内容" ***@163.com,***@163.com
fi
网友评论