From d6296ade9264ffdc3ff7ba40cfdf7c05ee8ea311 Mon Sep 17 00:00:00 2001 From: MS Date: Tue, 5 Dec 2023 14:12:52 +0100 Subject: idempotency --- netzbon/config_libeufin_bank.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'netzbon') diff --git a/netzbon/config_libeufin_bank.sh b/netzbon/config_libeufin_bank.sh index 0c5a4b4..8a44d8c 100755 --- a/netzbon/config_libeufin_bank.sh +++ b/netzbon/config_libeufin_bank.sh @@ -71,17 +71,14 @@ echo "settings = { bankName: \"${BANK_NAME}\" }" >/etc/libeufin/settings.js say "DONE" say "Create exchange account..." -EXCHANGE_PAYTO_NEW="$(sudo -u libeufin-bank libeufin-bank create-account '{"username":"exchange","password":"'${BANK_EXCHANGE_PASSWORD}'","name":"Exchange","is_taler_exchange":true}')?receiver-name=Exchange" -EXCHANGE_WIRE_GATEWAY_URL_NEW="${PROTO}://bank.$DOMAIN_NAME/accounts/exchange/taler-wire-gateway/" - -# Communicating this to the exchange script, as the exchange -# needs these for the /keys response. if test -z "${EXCHANGE_PAYTO:-}"; then + EXCHANGE_PAYTO_NEW="$(sudo -u libeufin-bank libeufin-bank create-account '{"username":"exchange","password":"'${BANK_EXCHANGE_PASSWORD}'","name":"Exchange","is_taler_exchange":true}')?receiver-name=Exchange" echo "EXCHANGE_PAYTO=\"${EXCHANGE_PAYTO_NEW}\"" >> config/internal.conf fi if test -z "${EXCHANGE_WIRE_GATEWAY_URL:-}"; then + EXCHANGE_WIRE_GATEWAY_URL_NEW="${PROTO}://bank.$DOMAIN_NAME/accounts/exchange/taler-wire-gateway/" echo "EXCHANGE_WIRE_GATEWAY_URL=\"${EXCHANGE_WIRE_GATEWAY_URL_NEW}\"" >> config/internal.conf fi -- cgit v1.2.3