Tomcat快捷后台启动、停止的脚本

启动:后台运行脚本run.sh

source shutdown.sh
rm -rf work/*
rm -rf webapps/bk
nohup ./bin/catalina.sh run >tomcat.txt &

停止:

#!/bin/bash
cur=`pwd`
pid=`ps -ef|grep $cur|grep -v "grep"|awk '{print $2}'`
echo "正在关闭进程"$cur "进程号:"$pid
kill -9 $pid
    原文作者:冰剑
    原文地址: https://segmentfault.com/a/1190000000664362
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞