diff --git a/bin/pandachi-install b/bin/pandachi-install index 82f084b..492c267 100755 --- a/bin/pandachi-install +++ b/bin/pandachi-install @@ -47,14 +47,14 @@ cat < /root/.pgm.rc prefix_pg_local_command=" " ## otherwise, will default to sudo -u postgres 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 } -cp "$pgpass" /root/.pgpass +cp "\$pgpass" /root/.pgpass 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 exit 1 }