diff --git a/scripts/portal-down.sh b/scripts/portal-down.sh index b2a9593c..3b1e9a94 100755 --- a/scripts/portal-down.sh +++ b/scripts/portal-down.sh @@ -2,6 +2,11 @@ set -e # exit on first error +TIMEOUT=${1:-300} # default timeout is 300s +if ! [[ "$TIMEOUT" =~ ^[0-9]+$ ]]; then + echo "Timeout has to be valid integer" && exit 1 +fi + countdown() { local secs=$1 while [ $secs -gt 0 ]; do @@ -12,7 +17,7 @@ countdown() { } # stop healh-check so the server is taken our of load balancer -docker exec health-check cli/disable +# docker exec health-check cli/disable # then wait 5 minutes for the load balancer to propagate the dns records -countdown 300 +countdown $TIMEOUT