Skip to content

Commit

Permalink
Update start.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
seungueonn committed Sep 4, 2023
1 parent 18cf1d9 commit 2ddecb4
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions scripts/start.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
#!/usr/bin/env bash

PROJECT_ROOT="/home/ubuntu"
JAR_FILE="$PROJECT_ROOT/dashboard-0.0.1-SNAPSHOT.jar"

APP_LOG="$PROJECT_ROOT/application.log"
ERROR_LOG="$PROJECT_ROOT/error.log"
DEPLOY_LOG="$PROJECT_ROOT/deploy.log"

TIME_NOW=$(date +%c)

# build 파일 복사
echo "$TIME_NOW > $JAR_FILE 파일 복사" >> $DEPLOY_LOG
cp $PROJECT_ROOT/build/libs/*.jar $JAR_FILE

# jar 파일 실행
echo "$TIME_NOW > $JAR_FILE 파일 실행" >> $DEPLOY_LOG
nohup java -jar $JAR_FILE > $APP_LOG 2> $ERROR_LOG &

CURRENT_PID=$(pgrep -f $JAR_FILE)
echo "$TIME_NOW > 실행된 프로세스 아이디 $CURRENT_PID 입니다." >> $DEPLOY_LOG
echo "$TIME_NOW > 실행된 프로세스 아이디 $CURRENT_PID 입니다." >> $DEPLOY_LOG

0 comments on commit 2ddecb4

Please sign in to comment.