[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated: netzbon currency config
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated: netzbon currency config |
Date: |
Thu, 30 Nov 2023 13:39:01 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository deployment.
The following commit(s) were added to refs/heads/master by this push:
new 260fae2 netzbon currency config
260fae2 is described below
commit 260fae24471ab727a2545d9922be6c2ffef3e0aa
Author: MS <ms@taler.net>
AuthorDate: Thu Nov 30 13:38:43 2023 +0100
netzbon currency config
---
netzbon/config_libeufin_bank.sh | 31 +++++++++++++++++++++++--------
netzbon/main.sh | 2 +-
2 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/netzbon/config_libeufin_bank.sh b/netzbon/config_libeufin_bank.sh
index dfe6e6b..95a24de 100755
--- a/netzbon/config_libeufin_bank.sh
+++ b/netzbon/config_libeufin_bank.sh
@@ -45,14 +45,29 @@ fi
# TODO: add sanity-checks for presence of other required env-vars
say "Configure the bank with ${CURRENCY}..."
+
# TODO is 20000000 big enough for admin dbt limit
-echo -e "[libeufin-bank]\n" \
- "CURRENCY=${CURRENCY}\n"\
- "DEFAULT_EXCHANGE=${PROTO}://exchange.$DOMAIN_NAME\n"\
- "DEFAULT_ADMIN_DEBT_LIMIT=${CURRENCY}:20000000\n"\
- "SERVE=tcp\n"\
- "PORT=$BANK_PORT\n"\
- >> /etc/libeufin/libeufin-bank.conf
+cat << EOF >> /etc/libeufin/libeufin-bank.conf
+[libeufin-bank]
+CURRENCY=${CURRENCY}
+DEFAULT_EXCHANGE=${PROTO}://exchange.${DOMAIN_NAME}
+DEFAULT_ADMIN_DEBT_LIMIT=${CURRENCY}:20000000
+SERVE=tcp
+PORT=${BANK_PORT}
+EOF
+
+if ! taler-config -s "currency-$CURRENCY" -o code &> /dev/null
+then cat << EOF >> /etc/libeufin/libeufin-bank.conf
+[currency-netzbon]
+ENABLED = YES
+name = "NetzBon"
+code = "NETZBON"
+fractional_input_digits = 2
+fractional_normal_digits = 2
+fractional_trailing_zero_digits = 2
+alt_unit_names = {"0":"NETZBON"}
+EOF
+fi
say "Setting up libeufin-bank database"
libeufin-bank-dbconfig
@@ -97,4 +112,4 @@
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
\ No newline at end of file
+echo "EXCHANGE_WIRE_GATEWAY_URL=\"${EXCHANGE_WIRE_GATEWAY_URL}\"" >>
config/internal.conf
diff --git a/netzbon/main.sh b/netzbon/main.sh
index 7776e8e..22c13dc 100755
--- a/netzbon/main.sh
+++ b/netzbon/main.sh
@@ -27,7 +27,7 @@ say "All configuration values asked during the setup script"
say "can be changed in config/user.conf"
if test -z "${CURRENCY:-}"; then
- read -r -p "Enter the name of the currency (e.g. 'EUR'): " CURRENCY
+ read -r -p "Enter the name of the currency (e.g. 'NETZBON'): " CURRENCY
# convert to all-caps
CURRENCY=$(echo "${CURRENCY}" | tr a-z A-Z)
# libeufin currenly doesn't like currency names less than 3 letters.
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-deployment] branch master updated: netzbon currency config,
gnunet <=