From e2e195cae7f3e23ccba5b8610c107db28a2e21e2 Mon Sep 17 00:00:00 2001 From: "Vytautas A." Date: Sun, 8 Dec 2024 20:49:43 -0600 Subject: [PATCH] Fix stop script. --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0b55a91..005eef3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -42,7 +42,7 @@ jobs: run: | ssh -i ec2_key.pem -o StrictHostKeyChecking=no ec2-user@${{ secrets.EC2_HOST }} << 'EOF' PORT=${{ secrets.API_LISTENING_PORT }} - PID=$(sudo ss -tulnp | grep ":$PORT" | awk '{print $6}' | cut -d',' -f2 | cut -d'=' -f2) + PID=$(sudo ss -tulnp | grep ":$PORT" | awk -F'[=,]' '{print $3}') if [ -n "$PID" ]; then echo "Stopping Spring Boot app running on port $PORT with PID: $PID" sudo kill $PID