Don't use a default reason when downing a portal.

This commit is contained in:
Ivaylo Novakov 2022-04-06 18:18:32 +02:00
parent 5473b8475a
commit e2171b5a89
No known key found for this signature in database
GPG Key ID: 06B9354AB08BE9C6
1 changed files with 6 additions and 2 deletions

View File

@ -12,7 +12,11 @@ do
done
delay=${delay:-0} # default to no delay
timeout=${timeout:-300} # default timeout is 300s
reason=${reason:-"disabled manually"}
if [[ -z $reason ]]; then
echo "Please provide a reason for disabling the portal (use '-r <reason>')."
exit 1
fi
countdown() {
local secs=$1
@ -26,7 +30,7 @@ countdown() {
# delay disabling the portal
countdown $delay
# stop healh-check so the server is taken our of load balancer
# stop health-check so the server is taken our of load balancer
docker exec health-check cli disable $reason
# then wait 5 minutes for the load balancer to propagate the dns records