#!/bin/bash set -eu # shellcheck source=/dev/null source "${BASE}/env_${ENVIRONMENT}" for host in "${GCP_PGBOUNCERS[@]}" "${AZURE_PGBOUNCERS[@]}" do echo "Check pgbouncer on $host" echo "SHOW DATABASES" | ssh_remote "$host" gitlab-ctl pgb-console echo "SHOW SERVERS" | ssh_remote "$host" gitlab-ctl pgb-console read -r -s -N 1 -p "Press [y] to continue, any other key to abort." key if [ "$key" != "y" ] then exit 1 fi done