Tomcat:Tomcat守护脚本
echo 'Tomcat deamon script started...'
while true
do
process=`ps -ef | grep tomcat-js | grep -v grep`
if [ -z "${process}" ]; then
echo tomcat stopped!
echo tomcat stopped at: `date +'%Y-%m-%d %H:%M:%S'`>> deamon.log
echo `free -m` >> deamon.log
/home/solee/start.sh
else
echo 'running...'
fi
sleep 10
done