From 0c29a596400dfd4791a77dfe8e1739ce17b63128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Sat, 3 Jun 2017 16:32:15 +0200 Subject: [PATCH] set postgresql db user to fix rake db:drop --- contrib/packager.io/functions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/packager.io/functions b/contrib/packager.io/functions index 48d1b3378..b650fcdc5 100644 --- a/contrib/packager.io/functions +++ b/contrib/packager.io/functions @@ -140,12 +140,12 @@ function create_postgresql_db () { echo "# Restarting postgresql server" ${INIT_CMD} restart postgresql - echo "# Creating zammad postgresql db" - su - postgres -c "createdb -E UTF8 ${DB}" - echo "# Creating zammad postgresql user" echo "CREATE USER \"${DB_USER}\" WITH PASSWORD '${DB_PASS}';" | su - postgres -c psql + echo "# Creating zammad postgresql db" + su - postgres -c "createdb -E UTF8 ${DB} -O ${DB_USER}" + echo "# Grant privileges to new postgresql user" echo "GRANT ALL PRIVILEGES ON DATABASE \"${DB}\" TO \"${DB_USER}\";" | su - postgres -c psql }