From aa9eb7d08e7167c8ba9739901a3d8db2187c0376 Mon Sep 17 00:00:00 2001 From: jinseohyun1228 <121755257+jinseohyun1228@users.noreply.github.com> Date: Fri, 8 Nov 2024 04:13:11 +0900 Subject: [PATCH] Update start_server.sh --- scripts/start_server.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/start_server.sh b/scripts/start_server.sh index e69de29b..0b80459e 100644 --- a/scripts/start_server.sh +++ b/scripts/start_server.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# JAR 파일 경로 +JAR_PATH="/home/ubuntu/my-spring-app/libs/boomerang-0.0.1-SNAPSHOT.jar" + +# 애플리케이션 종료 (기존 프로세스 종료) +pkill -f $JAR_PATH + +# 애플리케이션 실행 +nohup java -jar $JAR_PATH > /home/ubuntu/my-spring-app/log.txt 2>&1 &