diff options
Diffstat (limited to 'netzbon/config_libeufin_bank.sh')
-rwxr-xr-x | netzbon/config_libeufin_bank.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/netzbon/config_libeufin_bank.sh b/netzbon/config_libeufin_bank.sh index ad3d66d..2e4dd76 100755 --- a/netzbon/config_libeufin_bank.sh +++ b/netzbon/config_libeufin_bank.sh @@ -97,3 +97,32 @@ fi say "Start the bank..." systemctl enable --now libeufin-bank + +say "Waiting for the bank (/config)..." +curl --max-time 2 \ + --retry-all-errors \ + --retry-delay 1 \ + --retry 10 \ + "${EXCHANGE_BASE_URL}"config &>/dev/null +say "DONE" +curl -i ${PROTO}://bank.${DOMAIN_NAME}/config \ + +say "Setting conversion figures..." + +-u "admin:${BANK_ADMIN_PASSWORD}" \ +-H 'Content-Type: application/json; charset=utf-8' \ +--data-binary @- << EOF +{ + "cashin_ratio": "1", + "cashin_fee": "${CURRENCY}:0", + "cashin_tiny_amount": "${CURRENCY}:0", + "cashin_rounding_mode": "nearest", + "cashin_min_amount": "${FIAT_CURRENCY}:1", + "cashout_ratio": "1", + "cashout_fee": "${FIAT_CURRENCY}:0", + "cashout_tiny_amount": "${FIAT_CURRENCY}:0", + "cashout_rounding_mode": "zero", + "cashout_min_amount": "${CURRENCY}:1" +} +EOF +say "DONE" |