diff --git a/scripts/switch.sh b/scripts/switch.sh index 8fb9542e..a8c098c0 100644 --- a/scripts/switch.sh +++ b/scripts/switch.sh @@ -4,12 +4,12 @@ PROFILE_BLUE=$(curl -s http://127.0.0.1:8081/api/profile) PROFILE_GREEN=$(curl -s http://127.0.0.1:8082/api/profile) # blue가 사용중이면 green이 쉬고 있고, 반대면 blue가 쉬고 있음 -if [ $PROFILE_BLUE == green ] -then - IDLE_PORT=8082 -elif [ $PROFILE_GREEN == blue ] +if [ $PROFILE_BLUE == blue ] then IDLE_PORT=8081 +elif [ $PROFILE_GREEN == green ] +then + IDLE_PORT=8082 else echo "> 일치하는 Profile이 없습니다. Profile: $PROFILE_BLUE $PROFILE_GREEN" echo "> 8081을 할당합니다."