From f1ef00d34f55e2dc59f70c6a5ad7c55d139c3a1b Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Tue, 15 Sep 2020 14:57:32 +0200 Subject: [PATCH] Use su to call psql --- seqs/matrix.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/seqs/matrix.sh b/seqs/matrix.sh index 66b5645..c924431 100755 --- a/seqs/matrix.sh +++ b/seqs/matrix.sh @@ -201,9 +201,10 @@ step_22() { echo " pg_restore -h localhost -p 5432 -U synapse -d new_db -v \"10.70.0.61.backup\"" echo echo "Available postgresql databases:" - exe cd ~postgres && su -c "psql -c '\l'" - postgres + exe cd ~postgres + exe su postgres -c "psql -c '\l'" echo "Available postgresql user:" - exe cd ~postgres && su -c "psql -c '\du'" - postgres + exe su postgres -c "psql -c '\du'" } # Read postgres database information dbname/user/pass if empty