[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated: idempotency & withdraw
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated: idempotency & withdraw |
Date: |
Sun, 03 Dec 2023 15:50:08 +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 8e2b017 idempotency & withdraw
8e2b017 is described below
commit 8e2b017bebd5ebfb62ee0039c356188c3b666e04
Author: MS <ms@taler.net>
AuthorDate: Sun Dec 3 15:47:51 2023 +0100
idempotency & withdraw
- patching the configuration only once
- define exchange URL according to the PROTO variable
---
netzbon/config_libeufin_bank.sh | 7 +++++--
netzbon/config_libeufin_nexus.sh | 4 +++-
netzbon/withdraw.sh | 9 ++++-----
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/netzbon/config_libeufin_bank.sh b/netzbon/config_libeufin_bank.sh
index 9755596..97eefe3 100755
--- a/netzbon/config_libeufin_bank.sh
+++ b/netzbon/config_libeufin_bank.sh
@@ -47,7 +47,9 @@ fi
say "Configure the bank with ${CURRENCY}..."
# TODO is 20000000 big enough for admin dbt limit
-cat << EOF >> /etc/libeufin/libeufin-bank.conf
+
+if ! taler-config -s "libeufin-bank" -o code &> /dev/null
+then cat << EOF >> /etc/libeufin/libeufin-bank.conf
[libeufin-bank]
CURRENCY=${CURRENCY}
DEFAULT_EXCHANGE=${PROTO}://exchange.${DOMAIN_NAME}
@@ -56,8 +58,9 @@ DEFAULT_CUSTOMER_DEBT_LIMIT=${CURRENCY}:0
SERVE=tcp
PORT=${BANK_PORT}
EOF
+fi
-if ! taler-config -s "currency-$CURRENCY" -o code &> /dev/null
+if ! taler-config -s "currency-netzbon" -o code &> /dev/null
then cat << EOF >> /etc/libeufin/libeufin-bank.conf
[currency-netzbon]
ENABLED = YES
diff --git a/netzbon/config_libeufin_nexus.sh b/netzbon/config_libeufin_nexus.sh
index c18e86f..5d95008 100755
--- a/netzbon/config_libeufin_nexus.sh
+++ b/netzbon/config_libeufin_nexus.sh
@@ -14,9 +14,11 @@ source functions.sh
# the section [ebics-setup]. This is a manual process that is
# to be conducted separately.
-echo -e "[nexus-postgres]\n"\
+if ! taler-config -s "nexus-postgres" -o code &> /dev/null
+then echo -e "[nexus-postgres]\n"\
"config = postgresql:///libeufin" \
>> /etc/libeufin/libeufin-nexus.conf
+fi
say "Setting up libeufin-nexus database"
libeufin-nexus-dbconfig
diff --git a/netzbon/withdraw.sh b/netzbon/withdraw.sh
index d885b1d..c0d6fcf 100755
--- a/netzbon/withdraw.sh
+++ b/netzbon/withdraw.sh
@@ -2,14 +2,13 @@
set -eu
-# Loading values (DOMAIN_NAME & CURRENCY)
-. config/user.conf
-DBNAME=libeufinbank
-NEXUS_CONFIG_FILE="FIXME"
+. config/user.conf # DOMAIN_NAME & CURRENCY
+. config/internal.conf # PROTO
+NEXUS_CONFIG_FILE=/etc/libeufin/libeufin-nexus.conf
RESERVE_PUB=$(taler-wallet-cli \
api 'acceptManualWithdrawal' \
- '{"exchangeBaseUrl":"exchange.'$DOMAIN_NAME'",
+ '{"exchangeBaseUrl":'${PROTO}'://exchange.'$DOMAIN_NAME'",
"amount":"'$CURRENCY':5"
}' | jq -r .result.reservePub)
DEBTOR_IBAN="CH8389144317421994586"
--
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: idempotency & withdraw,
gnunet <=