diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 65fd661..93f0524 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -1,8 +1,8 @@ #!/bin/sh # 找到Springboot项目对应的进程id -$P_ID=`ps -ef | grep demo4bonus-0.0.1-SNAPSHOT.jar | grep -v grep | awk '{print $2}'` +P_ID=`ps -ef | grep -w demo4bonus-0.0.1 | grep -v "grep" | awk '{print $2}'` # 如果该项目已经在服务器上启动则kill掉 -echo “原应用程序进程id:$pid” +echo “原应用程序进程id:$P_ID” if [ "$P_ID" == "" ]; then echo "===service process doest not exist" else