summaryrefslogtreecommitdiff
path: root/netzbon/config_libeufin_bank.sh
diff options
context:
space:
mode:
authorAntoine A <>2023-11-29 15:34:54 +0000
committerAntoine A <>2023-11-29 15:34:54 +0000
commit2c02173cf7dcdb09b822670c1a6f15c6fe6e39d8 (patch)
treeaec30e92022f4fefda8dd7cf62b3b95b673d0259 /netzbon/config_libeufin_bank.sh
parentfd4cb33030a2a1845ee2ca5e15a73ef044205a2b (diff)
downloaddeployment-2c02173cf7dcdb09b822670c1a6f15c6fe6e39d8.tar.gz
deployment-2c02173cf7dcdb09b822670c1a6f15c6fe6e39d8.tar.bz2
deployment-2c02173cf7dcdb09b822670c1a6f15c6fe6e39d8.zip
Fix config_libeufin_bank.sh
Diffstat (limited to 'netzbon/config_libeufin_bank.sh')
-rwxr-xr-xnetzbon/config_libeufin_bank.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/netzbon/config_libeufin_bank.sh b/netzbon/config_libeufin_bank.sh
index 4662cd4..4e45c52 100755
--- a/netzbon/config_libeufin_bank.sh
+++ b/netzbon/config_libeufin_bank.sh
@@ -51,13 +51,15 @@ else
fi
say "Configure the bank with ${CURRENCY}..."
-# TODO Less fields to overrride with better default ?
+# TODO is 20000000 big enough for admin dbt limit
+# TODO With port should be use ?
+PORT=9090
echo -e "[libeufin-bank]\n" \
"CURRENCY=${CURRENCY}\n"\
"DEFAULT_EXCHANGE=${PROTO}://exchange.$DOMAIN_NAME\n"\
- "DEFAULT_CUSTOMER_DEBT_LIMIT=${CURRENCY}:0\n"\
"DEFAULT_ADMIN_DEBT_LIMIT=${CURRENCY}:20000000\n"\
- "REGISTRATION_BONUS=${CURRENCY}:0\n"\
+ "SERVE=tcp\n"\
+ "PORT=$PORT\n"\
>> /etc/libeufin/libeufin-bank.conf
say "Setting up libeufin-bank database"
@@ -76,14 +78,12 @@ say "DONE"
say "Start the bank..."
systemctl enable --now libeufin-bank
-LIBEUFIN_BANK_URL="${PROTO}://bank.$DOMAIN_NAME"
-
say "Waiting for bank to be running..."
curl --max-time 25 \
--retry-connrefused \
--retry-delay 3 \
--retry 10 \
- "${LIBEUFIN_BANK_URL}" &>/dev/null
+ "http://localhost:$PORT" &>/dev/null
say "DONE"
say "Create exchange account..."
@@ -96,11 +96,11 @@ wget \
--header='Content-type: application/json' \
--body-data="${BODY}" \
-O "$LAST_RESPONSE" \
- "${LIBEUFIN_BANK_URL}/accounts"
+ "http://localhost:$PORT/accounts"
say "DONE"
EXCHANGE_PAYTO="$(cat "$LAST_RESPONSE" | jq -r .internal_payto_uri)/receiver-name=Exchange"
-EXCHANGE_WIRE_GATEWAY_URL="${LIBEUFIN_BANK_URL}/accounts/exchange/taler-wire-gateway/"
+EXCHANGE_WIRE_GATEWAY_URL="${PROTO}://bank.$DOMAIN_NAME/accounts/exchange/taler-wire-gateway/"
# Communicating this to the exchange script, as the exchange
# needs these for the /keys response.