shell脚本停止springboot应用
作者:互联网
1、新建shell脚本输入以下内容
#!/bin/sh
appName="自己的jar包名称"
echo "Try to stop running aplication [${appName}]"
ids=`jps|grep ${appName}|awk '{print $1}'`
for id in ${ids}
do
echo "Stop application on pid ${id}..."
kill -9 ${id}
done
sleep 3s
echo "Stop application successfully"
2、执行脚本
标签:脚本,shell,springboot,appName,Stop,echo,application,id 来源: https://blog.csdn.net/weixin_45478355/article/details/120553421