[*] 结构调整

This commit is contained in:
acgist
2023-02-02 19:43:26 +08:00
parent 1de076ae16
commit d09a9dbc1f
201 changed files with 4 additions and 4 deletions

View File

@@ -0,0 +1,24 @@
#!/bin/bash
# 结束任务
killIndex=0
processId=$(ps -aux | grep "${project.artifactId}" | grep java | awk '{print $2}')
if [ ! -z "$processId" ]; then
echo "关闭应用:${project.artifactId}-${project.version} - $processId"
while [ ! -z "$processId" ]
do
echo -n "."
if [ $killIndex -le 0 ]; then
# 优雅关机
kill -15 $processId
elif [ $killIndex -ge 10 ]; then
echo -n '强制关闭'
# 强制关机
kill -9 $processId
fi
sleep 1
killIndex=$((killIndex+1))
processId=$(ps -aux | grep "${project.artifactId}" | grep java | awk '{print $2}')
done
echo ""
fi