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