commit 4cef7419c3b2f23ce4e9b3d4eff2e278b853b0b1
parent f9378fd23f581a48ea0d1754c5d5beb3cbc7bd1e
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 2 Mar 2023 15:06:55 +0100
correctly patch env files with DB names
Diffstat:
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/debian/db/install/pgsql b/debian/db/install/pgsql
@@ -2,16 +2,17 @@
set -eu
-libeufindb_secretconf=/etc/libeufin-db.secret.conf
-
# Get database settings from dbconfig-common and write Taler 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.
- echo -e "[libeufin-postgres]\nCONFIG=postgres:///${dbc_dbname}\n\n" > \
- $libeufindb_secretconf
+ echo -e "LIBEUFIN_NEXUS_DB_CONNECTION=jdbc:postgres:///${dbc_dbname}\n\n" >> \
+ /etc/libeufin/nexus.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 -
diff --git a/debian/etc/libeufin/nexus.env b/debian/etc/libeufin/nexus.env
@@ -2,4 +2,4 @@
# These settings will be passed as environment variables.
LIBEUFIN_NEXUS_PORT=5017
-LIBEUFIN_NEXUS_DB_CONNECTION=jdbc:sqlite:/var/lib/libeufin/nexus/nexus-db.sqlite3
+#LIBEUFIN_NEXUS_DB_CONNECTION=jdbc:sqlite:/var/lib/libeufin/nexus/nexus-db.sqlite3
diff --git a/debian/etc/libeufin/sandbox.env b/debian/etc/libeufin/sandbox.env
@@ -2,4 +2,4 @@
# These settings will be passed as environment variables.
LIBEUFIN_SANDBOX_PORT=5016
-LIBEUFIN_SANDBOX_DB_CONNECTION=jdbc:sqlite:/var/lib/libeufin/sandbox/sandbox-db.sqlite3
+#LIBEUFIN_SANDBOX_DB_CONNECTION=jdbc:sqlite:/var/lib/libeufin/sandbox/sandbox-db.sqlite3