From 5473b8475a9052fb23571ccbb979ac030d9b6761 Mon Sep 17 00:00:00 2001 From: Ivaylo Novakov Date: Wed, 6 Apr 2022 11:59:28 +0200 Subject: [PATCH] Update portal control scripts, so they can talk to the new health-check container. --- scripts/portal-down.sh | 6 ++++-- scripts/portal-up.sh | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/portal-down.sh b/scripts/portal-down.sh index 0b42b53a..a60ed863 100755 --- a/scripts/portal-down.sh +++ b/scripts/portal-down.sh @@ -2,15 +2,17 @@ set -e # exit on first error -while getopts d:t: flag +while getopts d:t:r: flag do case "${flag}" in d) delay=${OPTARG};; t) timeout=${OPTARG};; + r) reason=${OPTARG};; esac done delay=${delay:-0} # default to no delay timeout=${timeout:-300} # default timeout is 300s +reason=${reason:-"disabled manually"} countdown() { local secs=$1 @@ -25,7 +27,7 @@ countdown() { countdown $delay # stop healh-check so the server is taken our of load balancer -docker exec health-check cli/disable +docker exec health-check cli disable $reason # then wait 5 minutes for the load balancer to propagate the dns records countdown $timeout diff --git a/scripts/portal-up.sh b/scripts/portal-up.sh index 1a287f2f..fcd7fe80 100755 --- a/scripts/portal-up.sh +++ b/scripts/portal-up.sh @@ -3,4 +3,4 @@ set -e # exit on first error # start the health-checks service -docker exec health-check cli/enable +docker exec health-check cli enable