From fd59cbe6ef388ea0b4b6380e5887a4d5e6d6b93e Mon Sep 17 00:00:00 2001 From: clinton_admin Date: Mon, 4 Oct 2010 00:21:30 -0400 Subject: [PATCH 1/1] =?utf8?q?Temporary=20workaround=20to=20`domtool-postg?= =?utf8?q?res'=20script=20*=20Explicitly=20connect=20to=20`postgres'=20hos?= =?utf8?q?t=20until=20fritz=20has=20a=20slave=20=20=20installed=20and=20da?= =?utf8?q?tabases=20can=20be=20managed=20by=20slaves=C3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/plugins/domtool-postgres | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/domtool-postgres b/src/plugins/domtool-postgres index 35fbc90..d05999f 100755 --- a/src/plugins/domtool-postgres +++ b/src/plugins/domtool-postgres @@ -4,8 +4,8 @@ case $1 in adduser) USERNAME=$2 - sudo -u postgres psql -c "CREATE USER $USERNAME" template1 - sudo -u postgres psql -c "ALTER TABLESPACE user_$USERNAME OWNER TO $USERNAME" + sudo -u postgres psql -h postgres -c "CREATE USER $USERNAME" template1 + sudo -u postgres psql -h postgres -c "ALTER TABLESPACE user_$USERNAME OWNER TO $USERNAME" ;; createdb) @@ -18,7 +18,7 @@ case $1 in ENCODING="-E $ENCODING" fi - sudo -u postgres createdb -O $USERNAME -D user_$USERNAME $ENCODING $DBNAME + sudo -u postgres createdb -h postgres -O $USERNAME -D user_$USERNAME $ENCODING $DBNAME ;; dropdb) @@ -26,7 +26,7 @@ case $1 in DBNAME_BASE=$3 DBNAME="${USERNAME}_${DBNAME_BASE}" - sudo -u postgres dropdb $DBNAME + sudo -u postgres dropdb -h postgres $DBNAME ;; *) -- 2.20.1