现在的位置: 首页 > 综合 > 正文

如何一键重启tomcat并清除缓存

2014年11月23日 ⁄ 综合 ⁄ 共 183字 ⁄ 字号 评论关闭

ppid=`ps -elf|grep tomcat|grep -v "grep" | awk '{print "",$4}'`
if [ -n "$ppid" ]; then
    echo  kill -9 "$ppid"
    kill -9 $ppid
fi
rm -rf  ../logs/*  ../temp/*  ../work/*
sh startup.sh
tail -f ../logs/catalina.out

抱歉!评论已关闭.