This commit is contained in:
yuzchen 2024-01-24 09:42:33 +08:00
parent f96aa14b59
commit adc141c35c
1 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ if [ -z "$P_ID" ]; then
echo "==Demo service process does not exist"
else
# 尝试优雅地关闭应用程序
kill -SIGTERM "$P_ID"
kill -9 "$P_ID"
wait "$P_ID" 2>/dev/null
# 检查进程是否仍在运行
@ -15,7 +15,7 @@ else
echo "Demo service process was terminated gracefully"
else
# 如果优雅关闭失败,则强制杀死进程
kill -SIGKILL "$P_ID"
kill -9 "$P_ID"
echo "Demo service process was killed forcefully"
fi
fi