summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine A <>2024-02-14 17:36:45 +0100
committerAntoine A <>2024-02-14 17:40:18 +0100
commit79b62a4d4de24089568ebcecdf2e1e3db04d0501 (patch)
tree4bcd1823da5f6a298ac6a6ea88855843dd5dc562
parent27a15d3c52388a34199f262e2757a47f7bf425f8 (diff)
downloaddeployment-79b62a4d4de24089568ebcecdf2e1e3db04d0501.tar.gz
deployment-79b62a4d4de24089568ebcecdf2e1e3db04d0501.tar.bz2
deployment-79b62a4d4de24089568ebcecdf2e1e3db04d0501.zip
More redirection to setup.log
-rwxr-xr-xregional-currency/setup-exchange.sh16
-rwxr-xr-xregional-currency/setup-libeufin.sh8
2 files changed, 12 insertions, 12 deletions
diff --git a/regional-currency/setup-exchange.sh b/regional-currency/setup-exchange.sh
index 103cb90..bf1f22d 100755
--- a/regional-currency/setup-exchange.sh
+++ b/regional-currency/setup-exchange.sh
@@ -78,7 +78,7 @@ if test -z "${MASTER_PUBLIC_KEY:-}"; then
"SECM_TOFU_FILE=\$HOME/${SECMOD_TOFU_FILE}\n"\
>/etc/taler/conf.d/offline-setup.conf
- MASTER_PUBLIC_KEY=$(sudo -i -u taler-exchange-offline taler-exchange-offline -c /etc/taler/taler.conf -LDEBUG setup)
+ MASTER_PUBLIC_KEY=$(sudo -i -u taler-exchange-offline taler-exchange-offline -c /etc/taler/taler.conf -LDEBUG setup 2>> setup.log)
echo "MASTER_PUBLIC_KEY=\"${MASTER_PUBLIC_KEY}\"" >>config/user.conf
if test -z "${DO_OFFLINE:-}"; then
# Set 'DO_OFFLINE'
@@ -88,7 +88,7 @@ if test -z "${MASTER_PUBLIC_KEY:-}"; then
else
say "Master public key is $MASTER_PUBLIC_KEY"
if test ${DO_OFFLINE:-y} == y; then
- MASTER_PUBLIC_KEY2=$(sudo -i -u taler-exchange-offline taler-exchange-offline -c /etc/taler/taler.conf setup)
+ MASTER_PUBLIC_KEY2=$(sudo -i -u taler-exchange-offline taler-exchange-offline -c /etc/taler/taler.conf setup 2>> setup.log)
if test "${MASTER_PUBLIC_KEY2}" != "${MASTER_PUBLIC_KEY}"; then
say "Error: master public key missmatch ${MASTER_PUBLIC_KEY2} does not match ${MASTER_PUBLIC_KEY}"
exit 1
@@ -99,7 +99,7 @@ fi
export MASTER_PUBLIC_KEY
say "Stopping running exchange before reconfiguration"
-systemctl stop taler-exchange.target
+systemctl stop taler-exchange.target &>> setup.log
say "Configuring exchange"
@@ -181,18 +181,18 @@ say "Initializing exchange database"
taler-exchange-dbconfig -c /etc/taler/taler.conf &>> setup.log
say "Launching exchange"
-systemctl enable --now taler-exchange.target
+systemctl enable --now taler-exchange.target &>> setup.log
say "Waiting for exchange HTTP service (/config)..."
-curl --max-time 2 \
+curl -sS --max-time 2 \
--retry-all-errors \
--retry-delay 2 \
--retry 10 \
"${EXCHANGE_BASE_URL}"config &>> setup.log
say "Waiting for exchange management keys (this may take a while)..."
-curl --max-time 30 \
- --retry-delay 4 \
+curl -sS --max-time 30 \
+ --retry-delay 2 \
--retry 60 \
"${EXCHANGE_BASE_URL}"management/keys &>> setup.log
@@ -215,7 +215,7 @@ if test ${DO_OFFLINE} == y; then
fi
say "Waiting for exchange /keys..."
-curl --max-time 2 \
+curl -sS --max-time 2 \
--retry-connrefused \
--retry-delay 2 \
--retry 10 \
diff --git a/regional-currency/setup-libeufin.sh b/regional-currency/setup-libeufin.sh
index aea4121..3fbf316 100755
--- a/regional-currency/setup-libeufin.sh
+++ b/regional-currency/setup-libeufin.sh
@@ -85,7 +85,7 @@ echo "settings = { bankName: \"${BANK_NAME}\" }" >/etc/libeufin/settings.js
say "Create exchange account..."
if test -z "${EXCHANGE_PAYTO:-}"; then
- EXCHANGE_PAYTO_NEW="$(sudo -u libeufin-bank libeufin-bank create-account -c /etc/libeufin/libeufin-bank.conf --username exchange --password "${BANK_EXCHANGE_PASSWORD}" --name Exchange --exchange)?receiver-name=Exchange" 2>> setup.log
+ EXCHANGE_PAYTO_NEW="$(sudo -u libeufin-bank libeufin-bank create-account -c /etc/libeufin/libeufin-bank.conf --username exchange --password "${BANK_EXCHANGE_PASSWORD}" --name Exchange --exchange 2>> setup.log)?receiver-name=Exchange"
echo "EXCHANGE_PAYTO=\"${EXCHANGE_PAYTO_NEW}\"" >> config/internal.conf
fi
@@ -95,17 +95,17 @@ if test -z "${EXCHANGE_WIRE_GATEWAY_URL:-}"; then
fi
say "Start the bank..."
-systemctl enable --now libeufin-bank
+systemctl enable --now libeufin-bank &>> setup.log
say "Waiting for the bank (/config)..."
-curl --max-time 2 \
+curl -sS --max-time 2 \
--retry-all-errors \
--retry-delay 2 \
--retry 10 \
${PROTO}://bank.${DOMAIN_NAME}/config &>> setup.log
say "Setting conversion figures..."
-curl -u "admin:${BANK_ADMIN_PASSWORD}" \
+curl -sS -u "admin:${BANK_ADMIN_PASSWORD}" \
-H 'Content-Type: application/json; charset=utf-8' \
${PROTO}://bank.${DOMAIN_NAME}/conversion-info/conversion-rate \
--data-binary @- &>> setup.log << EOF