|
@ -72,11 +72,14 @@ pgpass="/srv/datastore/data/postgres/var/lib/postgresql/data/pgpass" |
|
|
} |
|
|
} |
|
|
cp "\$pgpass" /root/.pgpass |
|
|
cp "\$pgpass" /root/.pgpass |
|
|
|
|
|
|
|
|
PGUSER=postgres |
|
|
|
|
|
PGHOST=\$(docker-ip | grep postgres | xargs echo | cut -f 3 -d " ") || { |
|
|
|
|
|
echo "No local running postgres docker found." >&2 |
|
|
|
|
|
exit 1 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
PGUSER=\${PGUSER:-postgres} |
|
|
|
|
|
|
|
|
|
|
|
if [ -z "\$PGHOST" ]; then |
|
|
|
|
|
PGHOST=\$(docker-ip | grep postgres | xargs echo | cut -f 3 -d " ") || { |
|
|
|
|
|
echo "No local running postgres docker found." >&2 |
|
|
|
|
|
exit 1 |
|
|
|
|
|
} |
|
|
|
|
|
fi |
|
|
export PGHOST PGUSER |
|
|
export PGHOST PGUSER |
|
|
EOF |
|
|
EOF |
|
|
|
|
|
|
|
|