|
@ -47,14 +47,14 @@ cat <<EOF > /root/.pgm.rc |
|
|
prefix_pg_local_command=" " ## otherwise, will default to sudo -u postgres |
|
|
prefix_pg_local_command=" " ## otherwise, will default to sudo -u postgres |
|
|
|
|
|
|
|
|
pgpass="/srv/datastore/data/postgres/var/lib/postgresql/data/pgpass" |
|
|
pgpass="/srv/datastore/data/postgres/var/lib/postgresql/data/pgpass" |
|
|
[ -f "$pgpass" ] || { |
|
|
|
|
|
echo "No '$pgpass' found. Postgres database doesn't seem to be setup." >&2 |
|
|
|
|
|
|
|
|
[ -f "\$pgpass" ] || { |
|
|
|
|
|
echo "No '\$pgpass' found. Postgres database doesn't seem to be setup." >&2 |
|
|
exit 1 |
|
|
exit 1 |
|
|
} |
|
|
} |
|
|
cp "$pgpass" /root/.pgpass |
|
|
|
|
|
|
|
|
cp "\$pgpass" /root/.pgpass |
|
|
|
|
|
|
|
|
PGUSER=postgres |
|
|
PGUSER=postgres |
|
|
PGHOST=$(docker-ip | grep postgres | xargs echo | cut -f 3 -d " ") || { |
|
|
|
|
|
|
|
|
PGHOST=\$(docker-ip | grep postgres | xargs echo | cut -f 3 -d " ") || { |
|
|
echo "No local running postgres docker found." >&2 |
|
|
echo "No local running postgres docker found." >&2 |
|
|
exit 1 |
|
|
exit 1 |
|
|
} |
|
|
} |
|
|