From 0bf7691875f53b6103cfae87ade45faffa92edfa Mon Sep 17 00:00:00 2001 From: yummygyudon Date: Fri, 4 Oct 2024 03:18:01 +0900 Subject: [PATCH] =?UTF-8?q?[CHORE]=20=EC=A1=B0=EA=B1=B4=EB=AC=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/health_check.sh | 5 +---- scripts/run_new_was.sh | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/health_check.sh b/scripts/health_check.sh index eb3ac83d..ea227b45 100644 --- a/scripts/health_check.sh +++ b/scripts/health_check.sh @@ -5,13 +5,10 @@ echo "> Health Check Start" CURRENT_RUNNING_PORT=$(cat /etc/nginx/conf.d/service-url.inc | grep -Po '[0-9]+' | tail -1) echo "> Current port of running WAS is ${CURRENT_RUNNING_PORT}." -if [ "${CURRENT_RUNNING_PORT}" -ne "8081" ]; then +if [ ${CURRENT_RUNNING_PORT} != 8081 ] -a [ ${CURRENT_RUNNING_PORT} != 8082 ] ; then # run_new_was 에서 정상적으로 처리되지 않았다는 의미 - 더 이상 진행되면 안된다. echo "> No WAS is connected to nginx" exit 1 -elif [ "${CURRENT_RUNNING_PORT}" -ne "8082" ]; then - echo "> No WAS is connected to nginx" - exit 1 fi echo "> Start health check of WAS at 'http://127.0.0.1:${CURRENT_RUNNING_PORT}/api/v1/test' ..." diff --git a/scripts/run_new_was.sh b/scripts/run_new_was.sh index 613f4584..f5be0d90 100644 --- a/scripts/run_new_was.sh +++ b/scripts/run_new_was.sh @@ -21,7 +21,8 @@ CHECK_PID=$(lsof -Fp -i TCP:${NEXT_RUNNING_PORT} | grep -Po 'p[0-9]+' | grep -Po if [ ! -z ${CHECK_PID} ]; then echo "> Kill WAS running at ${NEXT_RUNNING_PORT}." - sudo kill ${CHECK_PID} + sudo kill -15 ${CHECK_PID} + sleep 5 fi