Tag="destination-query.jar"
# 检查进程状态
pid=$(ps -ef | grep -v 'grep' | egrep $Tag| awk '{printf $2 " "}')
if [ "$pid" != "" ]; then
echo -n "boot ( pid $pid) is running"
echo
echo -n $"Shutting down boot: "
pid=$(ps -ef | grep -v 'grep' | egrep $Tag| awk '{printf $2 " "}')
if [ "$pid" != "" ]; then
echo "kill boot process"
# kill "$pid"
kill -9 "$pid"
fi
else
echo "boot is stopped"
fi
# 启动项目
nohup java -Xmx8192m -Xms8192m -Xmn2g -XX:+UseConcMarkSweepGC -XX:CMSFullGCsBeforeCompaction=5 -XX:+UseCMSCompactAtFullCollection -Dappliction=$Tag -jar $Tag > console.out 2>&1 &
#指定端口和JVM参数
#nohup java -Xms512M -Xmx512M -Xmn512M -XX:PermSize=256M -XX:MaxPermSize=512M -#Dappliction=$Tag -jar $Tag > console.out 2>&1 --server.port=8088 &
02-10
1450
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)