Skip to content

Commit

Permalink
Update stop.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ryulkim authored Nov 14, 2023
1 parent 1f53408 commit 9d6f523
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/stop.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#!/usr/bin/env bash

PROJECT_ROOT="/var/www/deploy"
JAR_FILE="$PROJECT_ROOT/ryulSpring.jar"

DEPLOY_LOG="$PROJECT_ROOT/deploy.log"

TIME_NOW=$(date +%c)

# jar 찾기
JAR_FILE=$(ls -tr $PROJECT_ROOT/ | grep jar | tail -n 1)
echo "JAR Name: $JAR_FILE" >> $DEPLOY_LOG

# 현재 구동 중인 애플리케이션 pid 확인
CURRENT_PID=$(pgrep -f $JAR_FILE)
CURRENT_PID=$(pgrep -f $PROJECT_ROOT/$JAR_FILE)

# 프로세스가 켜져 있으면 종료
if [ -z $CURRENT_PID ]; then
Expand Down

0 comments on commit 9d6f523

Please sign in to comment.