Skip to content

Commit

Permalink
Update switch.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
juno-junho authored Apr 18, 2024
1 parent 6d1c14f commit effb710
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/switch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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을 할당합니다."
Expand Down

0 comments on commit effb710

Please sign in to comment.