archivedir=/var/lib/pgsql/9.6/archive
archivedirdest=/var/lib/pgsql/9.6/archive
+cd # if used as root with sudo -u postgres home dir won't be readable and we will get errors
+
#Usage
if [ "$1" = "" ] || [ "$1" = "-h" ] || [ "$1" = "-help" ] || [ "$1" = "--help" ];
then
fi
echo -n "[INFO] Wating for replication to start "
- while [ "`psql -c 'SELECT * from pg_stat_replication' -h 10.200.1.61 -t postgres postgres | wc -l`" -lt 2 ] ; do
+ while [ "`psql -c 'SELECT * from pg_stat_replication' -h $1 -t postgres postgres | wc -l`" -lt 2 ] ; do
echo -n .
sleep 1
done