From 91e30fefe4f86c4095367bf538378791bfea21e5 Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Thu, 19 Dec 2024 17:25:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(web):=20=E4=BF=AE=E6=AD=A3=E5=81=9C?= =?UTF-8?q?=E6=AD=A2=E8=84=9A=E6=9C=AC=E4=B8=AD=E7=9A=84=E8=BF=9B=E7=A8=8B?= =?UTF-8?q?=E6=9F=A5=E6=89=BE=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 'ps ef' 修改为 'ps -ef',以确保在所有用户进程中查找 - 优化了进程查找逻辑,提高了脚本的准确性和可靠性 --- gringotts-web/bin/stop.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gringotts-web/bin/stop.sh b/gringotts-web/bin/stop.sh index d390d76..233b21a 100755 --- a/gringotts-web/bin/stop.sh +++ b/gringotts-web/bin/stop.sh @@ -4,7 +4,7 @@ original_command="$0" application_name="gringotts-web-1.0.0-SNAPSHOT.jar" function get_pid() { - ID=$(ps ef | grep "$application_name" | grep -v grep | grep -v $original_command | awk '{ print $2 }') + ID=$(ps -ef | grep "$application_name" | grep -v grep | grep -v $original_command | awk '{ print $2 }') if [[ -z "$ID" ]]; then ID=$(ps aux | grep "$application_name" | grep -v grep | grep -v $original_command | awk '{print $2}') if [[ -z "$ID" ]]; then