diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-08-24 20:03:58 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-08-24 20:03:58 +0200 |
commit | a1e53437d8d277dca5e8e646eea16457532ddafb (patch) | |
tree | b8ca491643e80787604cbfd3c48f2f9e30d066ac | |
parent | 8bbe228140865f7f7d23e2b3f02d176ba117490e (diff) |
-fix pgsql script
-rwxr-xr-x | debian/db/install/pgsql | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/debian/db/install/pgsql b/debian/db/install/pgsql index 8118fb7b..bb446c25 100755 --- a/debian/db/install/pgsql +++ b/debian/db/install/pgsql @@ -1,19 +1,16 @@ #!/bin/sh - set -eu - merchantdb_secretconf=/etc/taler/secrets/merchant-db.secret.conf merchantdb_overrideconf=/etc/taler/overrides.conf - # get database settings from dbconfig-common and configure # for ADMINISTRATIVE access if [ -f /etc/dbconfig-common/taler-merchant.conf ]; then . /etc/dbconfig-common/taler-merchant.conf case "$dbc_dbtype" in pgsql) - echo -e "[merchant]\nDB=postgres\n\n" > + echo -e "[merchant]\nDB=postgres\n\n" > \ $merchantdb_overrideconf - echo -e "[merchantdb-postgres]\nCONFIG=postgres:///${dbc_dbname}\n\n" > + echo -e "[merchantdb-postgres]\nCONFIG=postgres:///${dbc_dbname}\n\n" > \ $merchantdb_secretconf ;; sqlite3) @@ -31,11 +28,8 @@ if [ -f /etc/dbconfig-common/taler-merchant.conf ]; then ;; esac fi - # Run database initialization logic sudo -u postgres taler-merchant-dbinit -c /etc/taler/taler.conf - - # get database settings from dbconfig-common and configure # for service access! if [ -f /etc/dbconfig-common/taler-merchant.conf ]; then @@ -47,9 +41,9 @@ if [ -f /etc/dbconfig-common/taler-merchant.conf ]; then echo "GRANT SELECT, UPDATE ON ALL SEQUENCES IN SCHEMA public TO \"$dbc_dbuser\";" \ | sudo -u postgres psql "postgres:///$dbc_dbname" - echo -e "[merchantdb-postgres]\nCONFIG=postgres://${dbc_user}:${dbc_dbpass}@${dbc_dbserver}/${dbc_dbname}\n\n" > + echo -e "[merchantdb-postgres]\nCONFIG=postgres://${dbc_user}:${dbc_dbpass}@${dbc_dbserver}/${dbc_dbname}\n\n" > \ $merchantdb_secretconf - echo -e "[merchant]\nDB=postgres\n\n" > + echo -e "[merchant]\nDB=postgres\n\n" > \ $merchantdb_overrideconf ;; sqlite3) |