跳转到内容

欢迎来到Riguz的小站!这是一个私人wiki,用来记录一些我的笔记。

Tomcat:Tomcat守护脚本

来自WHY42
imported>Soleverlee2016年2月23日 (二) 16:43的版本
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
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