首页 > 其他 > 详细

jenkins启动备份tomcat脚本

时间:2021-08-26 12:42:02      阅读:26      评论:0      收藏:0      [点我收藏+]

source /etc/profile
a_file=/home/test/tomcat/webapps/ROOT

a_cache=/home/test/tomcat/work/Catalina/localhost

a_pid=`ps aux|grep tomcat|grep test|grep jar|grep -v grep|awk ‘{print $2}‘`

if [ "$a_pid" != "" ];then

nohup /home/test/tomcat/bin/shutdown.sh >/dev/null 2>&1 &
kill -9 $a_pid
fi

if [ -d "$a_cache" ];then

rm -rf $a_cache
fi


if [ -d "$a_file" ];then

rm -rf $a_file

fi

jenkins启动备份tomcat脚本

原文:https://www.cnblogs.com/lyc77/p/15188767.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!