Skip to content

Commit

Permalink
[CHORE] 조건문 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yummygyudon committed Oct 3, 2024
1 parent a1a6e9d commit 0bf7691
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 1 addition & 4 deletions scripts/health_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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' ..."
Expand Down
3 changes: 2 additions & 1 deletion scripts/run_new_was.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 0bf7691

Please sign in to comment.