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