summaryrefslogtreecommitdiff
path: root/netzbon/config_libeufin_bank.sh
diff options
context:
space:
mode:
authorMS <ms@taler.net>2023-12-04 21:54:10 +0100
committerMS <ms@taler.net>2023-12-04 21:55:09 +0100
commitac38198d161f892cd63bf118e3d780096f879c37 (patch)
tree57c431affd25b6479b2fb12646f268819862bf4e /netzbon/config_libeufin_bank.sh
parentbbb840a76aed609c4a188142d97095b722186c61 (diff)
downloaddeployment-ac38198d161f892cd63bf118e3d780096f879c37.tar.gz
deployment-ac38198d161f892cd63bf118e3d780096f879c37.tar.bz2
deployment-ac38198d161f892cd63bf118e3d780096f879c37.zip
netzbon deployment
- no duplicated lines in the conf files - factoring out questions to helper function
Diffstat (limited to 'netzbon/config_libeufin_bank.sh')
-rwxr-xr-xnetzbon/config_libeufin_bank.sh21
1 files changed, 9 insertions, 12 deletions
diff --git a/netzbon/config_libeufin_bank.sh b/netzbon/config_libeufin_bank.sh
index d431932..2adba40 100755
--- a/netzbon/config_libeufin_bank.sh
+++ b/netzbon/config_libeufin_bank.sh
@@ -77,17 +77,7 @@ alt_unit_names = {"0":"NETZBON"}
EOF
fi
-echo "GRANT USAGE ON SCHEMA libeufin_nexus TO \"libeufin-bank\"" \
- | sudo -i -u postgres psql libeufin
-
-echo "GRANT SELECT, INSERT, TRIGGER ON ALL TABLES IN SCHEMA libeufin_nexus TO \"libeufin-bank\"" \
- | sudo -i -u postgres psql libeufin
-
-say "Setting up libeufin-bank database"
-libeufin-bank-dbconfig
-
say "Setting up libeufin-bank admin account"
-# TODO DBUSER="libeufin-bank" ?
sudo -u "libeufin-bank" libeufin-bank passwd admin "${BANK_ADMIN_PASSWORD}"
say "Setting up SPA configuration..."
@@ -101,7 +91,14 @@ EXCHANGE_WIRE_GATEWAY_URL="${PROTO}://bank.$DOMAIN_NAME/accounts/exchange/taler-
# Communicating this to the exchange script, as the exchange
# needs these for the /keys response.
-echo "EXCHANGE_PAYTO=\"${EXCHANGE_PAYTO}\"" >> config/internal.conf
-echo "EXCHANGE_WIRE_GATEWAY_URL=\"${EXCHANGE_WIRE_GATEWAY_URL}\"" >> config/internal.conf
+
+if test -z "${EXCHANGE_PAYTO:-}"; then
+ echo "EXCHANGE_PAYTO=\"${EXCHANGE_PAYTO}\"" >> config/internal.conf
+fi
+
+if test -z "${EXCHANGE_WIRE_GATEWAY_URL:-}"; then
+ echo "EXCHANGE_WIRE_GATEWAY_URL=\"${EXCHANGE_WIRE_GATEWAY_URL}\"" >> config/internal.conf
+fi
+
say "Start the bank..."
systemctl enable --now libeufin-bank