Sistema de Apoio ao Processo Legislativo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
247 B

#!/usr/bin/env bash
while true; do
COUNT_PG=`psql $1 -c '\l \q' | grep sapl | wc -l`
if ! [ "$COUNT_PG" -eq "0" ]; then
break
fi
echo "Waiting for Database Connection $1..."
sleep 10
done
echo "Database is reachable!"