Skip to content

Commit

Permalink
Fix stop script.
Browse files Browse the repository at this point in the history
  • Loading branch information
vytaux committed Dec 9, 2024
1 parent 792376e commit e2e195c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e2e195c

Please sign in to comment.