Skip to content

Commit

Permalink
[bug] CI/CD 변경 감지 오류 해결 #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Si-Hyeak-KANG committed Jan 15, 2024
1 parent 182df29 commit 01b83ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ REPOSITORY=/home/ubuntu/app

echo "> 현재 구동 중인 애플리케이션 pid 확인"

CURRENT_PID=$(pgrep -fla java | grep hayan | awk '{print $1}')
CURRENT_PID=$(pgrep -fla java | grep hayan | awk '{print $1}' | netstat -ano | findstr 8080)

echo "현재 구동 중인 애플리케이션 pid: $CURRENT_PID"

if [ -z "$CURRENT_PID" ]; then
echo "현재 구동 중인 애플리케이션이 없으므로 종료하지 않습니다."
else
echo "> kill -15 $CURRENT_PID"
kill -15 $CURRENT_PID
echo "> kill -9 $CURRENT_PID"
kill -9 $CURRENT_PID
sleep 5
fi

Expand Down

0 comments on commit 01b83ea

Please sign in to comment.