Update portal control scripts, so they can talk to the new health-check container.
This commit is contained in:
parent
7bd54359e6
commit
5473b8475a
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in New Issue