From e2171b5a8923803d0d79b610ca9d9537cd74b5d1 Mon Sep 17 00:00:00 2001 From: Ivaylo Novakov Date: Wed, 6 Apr 2022 18:18:32 +0200 Subject: [PATCH] Don't use a default reason when downing a portal. --- scripts/portal-down.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/portal-down.sh b/scripts/portal-down.sh index a60ed863..476ce837 100755 --- a/scripts/portal-down.sh +++ b/scripts/portal-down.sh @@ -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 ')." + 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