aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/README-packaging.md6
-rwxr-xr-xdebian/db/install/pgsql13
-rw-r--r--debian/etc/taler/conf.d/merchant.conf4
-rw-r--r--debian/etc/taler/secrets/merchant-db.secret.conf0
-rwxr-xr-xdebian/rules7
5 files changed, 25 insertions, 5 deletions
diff --git a/debian/README-packaging.md b/debian/README-packaging.md
new file mode 100644
index 00000000..26dd6ab1
--- /dev/null
+++ b/debian/README-packaging.md
@@ -0,0 +1,6 @@
+## Database Setup
+
+We use dbconfig-common (https://www.debian.org/doc/manuals/dbconfig-common/)
+for database setup.
+
+
diff --git a/debian/db/install/pgsql b/debian/db/install/pgsql
index 45bf40b4..289ccb77 100755
--- a/debian/db/install/pgsql
+++ b/debian/db/install/pgsql
@@ -2,6 +2,9 @@
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
@@ -9,12 +12,12 @@ if [ -f /etc/dbconfig-common/taler-merchant.conf ]; then
case "$dbc_dbtype" in
pgsql)
taler-config \
- -c /etc/taler-merchant.conf \
+ -c $merchantdb_secretconf \
-s "merchantdb-postgres" \
-o "CONFIG" \
-V "postgres:///$dbc_dbname"
taler-config \
- -c /etc/taler-merchant.conf \
+ -c $merchantdb_overrideconf \
-s "merchant" \
-o "DB" \
-V "postgres"
@@ -36,7 +39,7 @@ if [ -f /etc/dbconfig-common/taler-merchant.conf ]; then
fi
# Run database initialization logic
-sudo -u postgres taler-merchant-dbinit -c /etc/taler-merchant.conf
+sudo -u postgres taler-merchant-dbinit -c /etc/taler/taler.conf
# get database settings from dbconfig-common and configure
@@ -51,12 +54,12 @@ if [ -f /etc/dbconfig-common/taler-merchant.conf ]; then
| sudo -u postgres psql "postgres:///$dbc_dbname"
taler-config \
- -c /etc/taler-merchant.conf \
+ -c $merchantdb_secretconf \
-s "merchantdb-postgres" \
-o "CONFIG" \
-V "postgres://$dbc_dbuser:$dbc_dbpass@$dbc_dbserver/$dbc_dbname"
taler-config \
- -c /etc/taler-merchant.conf \
+ -c $merchantdb_overrideconf \
-s "merchant" \
-o "DB" \
-V "postgres"
diff --git a/debian/etc/taler/conf.d/merchant.conf b/debian/etc/taler/conf.d/merchant.conf
index 6efc223a..bd150216 100644
--- a/debian/etc/taler/conf.d/merchant.conf
+++ b/debian/etc/taler/conf.d/merchant.conf
@@ -1,2 +1,6 @@
+# Read secret sections into configuration, but only
+# if we have permission to do so.
+@inline-secret@ exchangedb-postgres ../secrets/merchant-db.secret.conf
+
[merchant]
DATABASE = postgres
diff --git a/debian/etc/taler/secrets/merchant-db.secret.conf b/debian/etc/taler/secrets/merchant-db.secret.conf
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/debian/etc/taler/secrets/merchant-db.secret.conf
diff --git a/debian/rules b/debian/rules
index 66d379e4..af1170d0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -31,6 +31,13 @@ override_dh_auto_install-indep:
override_dh_auto_clean:
dh_auto_clean
+override_dh_installsystemd:
+ # Need to specify units manually, since we have multiple
+ # and dh_installsystemd by default only looks for "<package>.service".
+ dh_installsystemd -ptaler-merchant --name=taler-merchant-httpd --no-start --no-enable
+ # final invocation to generate daemon reload
+ dh_installsystemd
+
# Remove files already present in libtalerexchange from main taler-exchange package
override_dh_install:
dh_install