aboutsummaryrefslogtreecommitdiff
path: root/regional-currency/setup-exchange.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regional-currency/setup-exchange.sh')
-rwxr-xr-xregional-currency/setup-exchange.sh22
1 files changed, 9 insertions, 13 deletions
diff --git a/regional-currency/setup-exchange.sh b/regional-currency/setup-exchange.sh
index 6e84f5e..103cb90 100755
--- a/regional-currency/setup-exchange.sh
+++ b/regional-currency/setup-exchange.sh
@@ -178,8 +178,7 @@ done
# NOTE: already fixed in exchange.git, leaving in place
# until 0.9.4 release of fixed exchange Debian package. -CG
say "Initializing exchange database"
-taler-exchange-dbconfig -c /etc/taler/taler.conf || true # FIXME-CG: no exit 77 if DB exist
-# NOTE: latest exchange.git dbconfig no longer exits with 77, should remove || true with 0.9.4 exchange release.
+taler-exchange-dbconfig -c /etc/taler/taler.conf &>> setup.log
say "Launching exchange"
systemctl enable --now taler-exchange.target
@@ -187,17 +186,15 @@ systemctl enable --now taler-exchange.target
say "Waiting for exchange HTTP service (/config)..."
curl --max-time 2 \
--retry-all-errors \
- --retry-delay 1 \
+ --retry-delay 2 \
--retry 10 \
- "${EXCHANGE_BASE_URL}"config &>/dev/null
-say "DONE"
+ "${EXCHANGE_BASE_URL}"config &>> setup.log
say "Waiting for exchange management keys (this may take a while)..."
curl --max-time 30 \
- --retry-delay 1 \
+ --retry-delay 4 \
--retry 60 \
- "${EXCHANGE_BASE_URL}"management/keys &>/dev/null
-say "DONE"
+ "${EXCHANGE_BASE_URL}"management/keys &>> setup.log
if test ${DO_OFFLINE} == y; then
say "Offline interaction..."
@@ -207,22 +204,21 @@ if test ${DO_OFFLINE} == y; then
-c /etc/taler/taler.conf \
download \
sign \
- upload
+ upload &>> setup.log
sudo -i -u taler-exchange-offline \
taler-exchange-offline \
enable-account "${EXCHANGE_PAYTO}" \
wire-fee now iban "${CURRENCY}":0 "${CURRENCY}":0 \
global-fee now "${CURRENCY}":0 "${CURRENCY}":0 "${CURRENCY}":0 1h 6a 0 \
- upload
+ upload &>> setup.log
fi
say "Waiting for exchange /keys..."
curl --max-time 2 \
--retry-connrefused \
- --retry-delay 1 \
+ --retry-delay 2 \
--retry 10 \
- "${EXCHANGE_BASE_URL}"keys &>/dev/null
-say "DONE"
+ "${EXCHANGE_BASE_URL}"keys &>> setup.log
say "Exchange setup finished"