diff options
Diffstat (limited to 'debian/db/install/pgsql')
-rwxr-xr-x | debian/db/install/pgsql | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/debian/db/install/pgsql b/debian/db/install/pgsql index 79f95097..d820d3ec 100755 --- a/debian/db/install/pgsql +++ b/debian/db/install/pgsql @@ -2,21 +2,25 @@ set -eu -# Get database settings from dbconfig-common and write Taler configuration files. +# Get database settings from dbconfig-common and write libeufin configuration files. if [ -f /etc/dbconfig-common/taler-libeufin.conf ]; then . /etc/dbconfig-common/taler-libeufin.conf case "$dbc_dbtype" in pgsql) - # We assume ident auth here. We might support password auth later. + # We assume ident auth here. We might support password auth later. + echo -e "LIBEUFIN_NEXUS_PORT=5017" >> \ + /etc/libeufin/nexus.env echo -e "LIBEUFIN_NEXUS_DB_CONNECTION=jdbc:postgres:///${dbc_dbname}\n\n" >> \ /etc/libeufin/nexus.env + echo -e "LIBEUFIN_SANDBOX_PORT=5016" >> \ + /etc/libeufin/sandbox.env echo -e "LIBEUFIN_SANDBOX_DB_CONNECTION=jdbc:postgres:///${dbc_dbname}\n\n" >> \ /etc/libeufin/sandbox.env - - # Allow the libeufin-sandbox/nexus user to create schemas, needed by dbinit - echo "GRANT CREATE ON DATABASE \"${dbc_dbtype}\" TO \"libeufin-nexus\";" | sudo -u postgres psql -f - - echo "GRANT CREATE ON DATABASE \"${dbc_dbtype}\" TO \"libeufin-sandbox\";" | sudo -u postgres psql -f - + + # Allow the libeufin-sandbox/nexus user to create schemas. + # Note: user name and DB name must match here. + echo "GRANT CREATE ON DATABASE \"${dbc_dbname}\" TO \"${dbc_dbname}\";" | sudo -u postgres psql -f - ;; sqlite3) # Later: use something like: |