Update portal control scripts, so they can talk to the new health-check container.

This commit is contained in:
Ivaylo Novakov 2022-04-06 11:59:28 +02:00
parent 7bd54359e6
commit 5473b8475a
No known key found for this signature in database
GPG Key ID: 06B9354AB08BE9C6
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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