summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-04-06 14:19:11 +0200
committerFlorian Dold <florian@dold.me>2023-04-06 14:19:11 +0200
commitaead249b8b70efed7d4478010cf2234c0b2b2806 (patch)
treee289c748230634f0f4202659de79ef8fe7d60c52
parentf3b6056093083f2c35698bd372a57f0e7d4fac54 (diff)
downloaddeployment-aead249b8b70efed7d4478010cf2234c0b2b2806.tar.gz
deployment-aead249b8b70efed7d4478010cf2234c0b2b2806.tar.bz2
deployment-aead249b8b70efed7d4478010cf2234c0b2b2806.zip
shfmt
-rwxr-xr-xnetzbon/functions.sh56
-rwxr-xr-xnetzbon/install_packages.sh33
-rwxr-xr-xnetzbon/main.sh105
-rwxr-xr-xnetzbon/setup-exchange.sh220
-rwxr-xr-xnetzbon/setup-merchant.sh1
5 files changed, 172 insertions, 243 deletions
diff --git a/netzbon/functions.sh b/netzbon/functions.sh
index 29d9770..3938aca 100755
--- a/netzbon/functions.sh
+++ b/netzbon/functions.sh
@@ -1,62 +1,22 @@
#!/bin/bash
# Message
-
-function say()
-{
- echo "TALER: " "$@"
+function say() {
+ echo "TALER: " "$@"
}
-
# Check user if the user is root
+function check_user() {
-function check_user()
-{
-
- if [ "$(whoami)" != "root" ]; then
- say "Please run this script as root"
- exit 1
- fi
-}
-
-# Create users "exchange" and "merchant"
-# Deprecated: should be done by Debian!
-function create_users()
-{
- say "Creating users"
- for n in exchange merchant
- do
- # Only setup use if it does not yet exist
- if test ! -d /home/$n
- then
- adduser --disabled-password $n
- fi
- done
-}
-
-# Assign group and permissions to users
-# Deprecated: should be done by Debian!
-function assign_user_permissions()
-{
- for n in exchange merchant
- do
- adduser www-data $n
- mkdir -p /home/$n/.config/
- # FIXME
- # cp -r $n/* /home/$n/
- # TODO: No taler.conf is provided
- # mv /home/$n/taler.conf /home/$n/.config/taler.conf
- chmod 600 /home/$n/.config/taler.conf
- chown -R $n:$n /home/$n/
- su - postgres -c "createuser $n"
- su - postgres -c "createdb -O $n taler-$n"
- done
+ if [ "$(whoami)" != "root" ]; then
+ say "Please run this script as root"
+ exit 1
+ fi
}
# Set DISTRO to the detected distro or return non-zero
# status if distro not supported.
-function detect_distro()
-{
+function detect_distro() {
unset DISTRO
uname -a | grep Ubuntu >/dev/null && DISTRO=ubuntu && return 0
uname -a | grep Debian >/dev/null && DISTRO=debian && return 0
diff --git a/netzbon/install_packages.sh b/netzbon/install_packages.sh
index 9b77705..25bef3f 100755
--- a/netzbon/install_packages.sh
+++ b/netzbon/install_packages.sh
@@ -19,15 +19,15 @@ apt update
## General requirements
apt install uuid-runtime \
- curl \
- jq \
- wget \
- nginx \
- postgresql-${PG_VERSION} \
- postgresql-client-${PG_VERSION} \
- dbconfig-pgsql \
- certbot \
- python3-certbot-nginx -y
+ curl \
+ jq \
+ wget \
+ nginx \
+ postgresql-${PG_VERSION} \
+ postgresql-client-${PG_VERSION} \
+ dbconfig-pgsql \
+ certbot \
+ python3-certbot-nginx -y
## Add GNU Taler deb.taler.net to /etc/apt/sources.list
@@ -35,19 +35,18 @@ say "Adding GNU Taler apt repository"
say "Detected distro $DISTRO"
case $DISTRO in
- debian)
- echo "deb [signed-by=/etc/apt/keyrings/taler-systems.gpg] https://deb.taler.net/apt/debian stable main" > /etc/apt/sources.list.d/taler.list
+debian)
+ echo "deb [signed-by=/etc/apt/keyrings/taler-systems.gpg] https://deb.taler.net/apt/debian stable main" >/etc/apt/sources.list.d/taler.list
;;
- ubuntu)
- echo "deb [signed-by=/etc/apt/keyrings/taler-systems.gpg] https://deb.taler.net/apt/ubuntu stable main" > /etc/apt/sources.list.d/taler.list
+ubuntu)
+ echo "deb [signed-by=/etc/apt/keyrings/taler-systems.gpg] https://deb.taler.net/apt/ubuntu stable main" >/etc/apt/sources.list.d/taler.list
;;
- *)
- say "Unsupported distro: $DISTRO"
- exit 1
+*)
+ say "Unsupported distro: $DISTRO"
+ exit 1
;;
esac
-
wget -P /etc/apt/keyrings https://taler.net/taler-systems.gpg
## Specific GNU Taler packages
diff --git a/netzbon/main.sh b/netzbon/main.sh
index 52f5f67..b05af85 100755
--- a/netzbon/main.sh
+++ b/netzbon/main.sh
@@ -26,62 +26,53 @@ say ""
say "All configuration values asked during the setup script"
say "can be changed in config/user.conf"
-if test -z "${CURRENCY:-}"
-then
- read -p "Enter the name of the currency (e.g. 'EUR'): " CURRENCY
- # convert to all-caps
- CURRENCY=`echo ${CURRENCY} | tr a-z A-Z`
- # libeufin currenly doesn't like currency names less than 3 letters.
- if [[ ${#CURRENCY} -lt 3 || ${#CURRENCY} -gt 11 ]]; then
- say "Currency name must be between 3 and 10 letters"
- exit 1
- fi
- echo "CURRENCY=${CURRENCY}" >> config/user.conf
+if test -z "${CURRENCY:-}"; then
+ read -p "Enter the name of the currency (e.g. 'EUR'): " CURRENCY
+ # convert to all-caps
+ CURRENCY=$(echo ${CURRENCY} | tr a-z A-Z)
+ # libeufin currenly doesn't like currency names less than 3 letters.
+ if [[ ${#CURRENCY} -lt 3 || ${#CURRENCY} -gt 11 ]]; then
+ say "Currency name must be between 3 and 10 letters"
+ exit 1
+ fi
+ echo "CURRENCY=${CURRENCY}" >>config/user.conf
fi
-if test -z "${BANK_NAME:-}"
-then
- read -p "Enter the human-readable name of the bank (e.g. 'Taler Bank'): " BANK_NAME
- echo "BANK_NAME=\"${BANK_NAME}\"" >> config/user.conf
+if test -z "${BANK_NAME:-}"; then
+ read -p "Enter the human-readable name of the bank (e.g. 'Taler Bank'): " BANK_NAME
+ echo "BANK_NAME=\"${BANK_NAME}\"" >>config/user.conf
fi
-if test -z "${ENABLE_TLS:-}"
-then
- read -p "Use TLS? (y/n): " ENABLE_TLS
- echo "ENABLE_TLS=${ENABLE_TLS}" >> config/user.conf
+if test -z "${ENABLE_TLS:-}"; then
+ read -p "Use TLS? (y/n): " ENABLE_TLS
+ echo "ENABLE_TLS=${ENABLE_TLS}" >>config/user.conf
fi
-if test -z "${DO_OFFLINE:-}"
-then
- read -p "Run taler-exchange-offline? (y/n): " DO_OFFLINE
- echo "DO_OFFLINE=${DO_OFFLINE}" >> config/user.conf
+if test -z "${DO_OFFLINE:-}"; then
+ read -p "Run taler-exchange-offline? (y/n): " DO_OFFLINE
+ echo "DO_OFFLINE=${DO_OFFLINE}" >>config/user.conf
fi
-if test -z "${MASTER_PUBLIC_KEY:-}"
-then
- if test ${DO_OFFLINE:-y} == n
- then
- read -p "Enter the exchange-offline master public key: " MASTER_PUBLIC_KEY
- echo "MASTER_PUBLIC_KEY=${MASTER_PUBLIC_KEY}" >> config/user.conf
- fi
+if test -z "${MASTER_PUBLIC_KEY:-}"; then
+ if test ${DO_OFFLINE:-y} == n; then
+ read -p "Enter the exchange-offline master public key: " MASTER_PUBLIC_KEY
+ echo "MASTER_PUBLIC_KEY=${MASTER_PUBLIC_KEY}" >>config/user.conf
+ fi
fi
-if test -z "${SANDBOX_ADMIN_PASSWORD:-}"
-then
- read -s -p "Enter the admin password for the bank: " SANDBOX_ADMIN_PASSWORD
- echo "SANDBOX_ADMIN_PASSWORD=${SANDBOX_ADMIN_PASSWORD}" >> config/user.conf
- echo "" # force new line
+if test -z "${SANDBOX_ADMIN_PASSWORD:-}"; then
+ read -s -p "Enter the admin password for the bank: " SANDBOX_ADMIN_PASSWORD
+ echo "SANDBOX_ADMIN_PASSWORD=${SANDBOX_ADMIN_PASSWORD}" >>config/user.conf
+ echo "" # force new line
fi
-if test -z "${DOMAIN_NAME:-}"
-then
- read -p "Enter the domain name: " DOMAIN_NAME
- # convert to lower-case
- DOMAIN_NAME=`echo ${DOMAIN_NAME} | tr A-Z a-z`
- echo "DOMAIN_NAME=${DOMAIN_NAME}" >> config/user.conf
+if test -z "${DOMAIN_NAME:-}"; then
+ read -p "Enter the domain name: " DOMAIN_NAME
+ # convert to lower-case
+ DOMAIN_NAME=$(echo ${DOMAIN_NAME} | tr A-Z a-z)
+ echo "DOMAIN_NAME=${DOMAIN_NAME}" >>config/user.conf
fi
# END USER INTERACTION
# Check DNS settings
-if ! ping -c1 exchange.${DOMAIN_NAME} &> /dev/null
-then
- say "Could not ping exchange.${DOMAIN_NAME}."
- say "Please make sure your DNS/network are working."
- exit 1
+if ! ping -c1 exchange.${DOMAIN_NAME} &>/dev/null; then
+ say "Could not ping exchange.${DOMAIN_NAME}."
+ say "Please make sure your DNS/network are working."
+ exit 1
fi
# Check if the user is root, otherwise EXIT.
@@ -90,15 +81,13 @@ check_user
# Installation of deb packages required
. install_packages.sh
-if test -z "${NEXUS_EXCHANGE_PASSWORD:-}"
-then
- NEXUS_EXCHANGE_PASSWORD=`uuidgen`
- echo "NEXUS_EXCHANGE_PASSWORD=${NEXUS_EXCHANGE_PASSWORD}" >> config/internal.conf
+if test -z "${NEXUS_EXCHANGE_PASSWORD:-}"; then
+ NEXUS_EXCHANGE_PASSWORD=$(uuidgen)
+ echo "NEXUS_EXCHANGE_PASSWORD=${NEXUS_EXCHANGE_PASSWORD}" >>config/internal.conf
fi
-if test -z "${SANDBOX_EXCHANGE_PASSWORD:-}"
-then
- SANDBOX_EXCHANGE_PASSWORD=`uuidgen`
- echo "SANDBOX_EXCHANGE_PASSWORD=${SANDBOX_EXCHANGE_PASSWORD}" >> config/internal.conf
+if test -z "${SANDBOX_EXCHANGE_PASSWORD:-}"; then
+ SANDBOX_EXCHANGE_PASSWORD=$(uuidgen)
+ echo "SANDBOX_EXCHANGE_PASSWORD=${SANDBOX_EXCHANGE_PASSWORD}" >>config/internal.conf
fi
. config_launch_libeufin.sh
@@ -106,13 +95,11 @@ fi
. setup-exchange.sh
. setup-merchant.sh
-
# Final message to the user
-if test ${ENABLE_TLS:-} == "y"
-then
- PROTO="https"
+if test ${ENABLE_TLS:-} == "y"; then
+ PROTO="https"
else
- PROTO="http"
+ PROTO="http"
fi
say "Congratulations, you have successfully installed GNU Taler"
diff --git a/netzbon/setup-exchange.sh b/netzbon/setup-exchange.sh
index 54795d9..86ee031 100755
--- a/netzbon/setup-exchange.sh
+++ b/netzbon/setup-exchange.sh
@@ -17,30 +17,25 @@ say "Beginning Exchange setup"
# - EXCHANGE_PAYTO (exchange account PAYTO)
# - ENABLE_TLS (http or https?)
-if test -z ${LIBEUFIN_NEXUS_USERNAME:-}
-then
- say "Failure: LIBEUFIN_NEXUS_USERNAME not set"
- exit 1
+if test -z ${LIBEUFIN_NEXUS_USERNAME:-}; then
+ say "Failure: LIBEUFIN_NEXUS_USERNAME not set"
+ exit 1
fi
-if test -z ${NEXUS_EXCHANGE_PASSWORD:-}
-then
- say "Failure: NEXUS_EXCHANGE_PASSWORD not set"
- exit 1
+if test -z ${NEXUS_EXCHANGE_PASSWORD:-}; then
+ say "Failure: NEXUS_EXCHANGE_PASSWORD not set"
+ exit 1
fi
-if test -z ${EXCHANGE_IBAN:-}
-then
- say "Failure: EXCHANGE_IBAN not set"
- exit 1
+if test -z ${EXCHANGE_IBAN:-}; then
+ say "Failure: EXCHANGE_IBAN not set"
+ exit 1
fi
-if test -z ${WIRE_GATEWAY_URL:-}
-then
- say "Failure: WIRE_GATEWAY_URL not set"
- exit 1
+if test -z ${WIRE_GATEWAY_URL:-}; then
+ say "Failure: WIRE_GATEWAY_URL not set"
+ exit 1
fi
-if test -z ${EXCHANGE_PAYTO:-}
-then
- say "Failure: EXCHANGE_PAYTO not set"
- exit 1
+if test -z ${EXCHANGE_PAYTO:-}; then
+ say "Failure: EXCHANGE_PAYTO not set"
+ exit 1
fi
# Create master key as taler-exchange-offline *unless* user already
@@ -48,37 +43,32 @@ fi
export MASTER_PRIV_DIR=.local/share/taler/exchange/offline-keys
export MASTER_PRIV_FILE=${MASTER_PRIV_DIR}/master.priv
export SECMOD_TOFU_FILE=${MASTER_PRIV_DIR}/secm_tofus.pub
-if test -z ${MASTER_PUBLIC_KEY:-}
-then
- if test ${DO_OFFLINE:-y} == n
- then
- say "Error: No MASTER_PUBLIC_KEY but DO_OFFLINE set to NO"
- exit 1
- fi
- say "Setting up offline key"
- echo -e "[exchange-offline]\n"\
- "MASTER_PRIV_FILE=\$HOME/${MASTER_PRIV_FILE}\n"\
- "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 setup`
- echo "MASTER_PUBLIC_KEY=\"${MASTER_PUBLIC_KEY}\"" >> config/user.conf
- if test -z ${DO_OFFLINE:-}
- then
- # Set 'DO_OFFLINE'
- DO_OFFLINE=y
- echo "DO_OFFLINE=y" >> config/user.conf
- fi
+if test -z ${MASTER_PUBLIC_KEY:-}; then
+ if test ${DO_OFFLINE:-y} == n; then
+ say "Error: No MASTER_PUBLIC_KEY but DO_OFFLINE set to NO"
+ exit 1
+ fi
+ say "Setting up offline key"
+ echo -e "[exchange-offline]\n" \
+ "MASTER_PRIV_FILE=\$HOME/${MASTER_PRIV_FILE}\n" \
+ "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 setup)
+ echo "MASTER_PUBLIC_KEY=\"${MASTER_PUBLIC_KEY}\"" >>config/user.conf
+ if test -z ${DO_OFFLINE:-}; then
+ # Set 'DO_OFFLINE'
+ DO_OFFLINE=y
+ echo "DO_OFFLINE=y" >>config/user.conf
+ fi
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 setup`
- 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
- fi
+ if test ${DO_OFFLINE:-y} == y; then
+ MASTER_PUBLIC_KEY2=$(sudo -i -u taler-exchange-offline taler-exchange-offline setup)
+ 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
+ fi
fi
fi
@@ -98,58 +88,55 @@ sudo -i -u postgres createdb -O taler-exchange-httpd $EXCHANGE_DB || true
say "Configuring exchange"
-if test ${ENABLE_TLS} = "y"
-then
- export EXCHANGE_BASE_URL="https://exchange.${DOMAIN_NAME}/"
+if test ${ENABLE_TLS} = "y"; then
+ export EXCHANGE_BASE_URL="https://exchange.${DOMAIN_NAME}/"
else
- export EXCHANGE_BASE_URL="http://exchange.${DOMAIN_NAME}/"
+ export EXCHANGE_BASE_URL="http://exchange.${DOMAIN_NAME}/"
fi
# Generate /etc/taler/conf.d/setup.conf
-echo -e "[taler]\n"\
- "CURRENCY=${CURRENCY}\n"\
- "CURRENCY_ROUND_UNIT=${CURRENCY}:0.01\n"\
- "AML_THRESHOLD=${CURRENCY}:1000000\n"\
- "\n[exchange]\n"\
- "MASTER_PUBLIC_KEY=${MASTER_PUBLIC_KEY}\n"\
- "BASE_URL=${EXCHANGE_BASE_URL}\n"\
- "\n[merchant-exchange-${DOMAIN_NAME}]\n"\
- "MASTER_KEY=${MASTER_PUBLIC_KEY}\n"\
- "CURRENCY=${CURRENCY}\n"\
- "EXCHANGE_BASE_URL=${EXCHANGE_BASE_URL}\n"\
- "\n[exchange-account-default]\n"\
- "PAYTO_URI=${EXCHANGE_PAYTO}\n"\
- "ENABLE_DEBIT=YES\n"\
- "ENABLE_CREDIT=YES\n"\
- "@inline-secret@ exchange-accountcredentials-default ../secrets/exchange-accountcredentials-default.secret.conf\n" \
- > /etc/taler/conf.d/setup.conf
-
-echo -e "[exchangedb-postgres]\n"\
- "CONFIG=postgres:///${EXCHANGE_DB}\n"\
- > /etc/taler/secrets/exchange-db.secret.conf
+echo -e "[taler]\n" \
+ "CURRENCY=${CURRENCY}\n" \
+ "CURRENCY_ROUND_UNIT=${CURRENCY}:0.01\n" \
+ "AML_THRESHOLD=${CURRENCY}:1000000\n" \
+ "\n[exchange]\n" \
+ "MASTER_PUBLIC_KEY=${MASTER_PUBLIC_KEY}\n" \
+ "BASE_URL=${EXCHANGE_BASE_URL}\n" \
+ "\n[merchant-exchange-${DOMAIN_NAME}]\n" \
+ "MASTER_KEY=${MASTER_PUBLIC_KEY}\n" \
+ "CURRENCY=${CURRENCY}\n" \
+ "EXCHANGE_BASE_URL=${EXCHANGE_BASE_URL}\n" \
+ "\n[exchange-account-default]\n" \
+ "PAYTO_URI=${EXCHANGE_PAYTO}\n" \
+ "ENABLE_DEBIT=YES\n" \
+ "ENABLE_CREDIT=YES\n" \
+ "@inline-secret@ exchange-accountcredentials-default ../secrets/exchange-accountcredentials-default.secret.conf\n" \
+ >/etc/taler/conf.d/setup.conf
+
+echo -e "[exchangedb-postgres]\n" \
+ "CONFIG=postgres:///${EXCHANGE_DB}\n" \
+ >/etc/taler/secrets/exchange-db.secret.conf
chmod 440 /etc/taler/secrets/exchange-db.secret.conf
chown root:taler-exchange-db /etc/taler/secrets/exchange-db.secret.conf
-echo -e "[exchange-accountcredentials-default]\n"\
- "WIRE_GATEWAY_URL=${WIRE_GATEWAY_URL}\n"\
- "WIRE_GATEWAY_AUTH_METHOD=basic\n"\
- "USERNAME=${LIBEUFIN_NEXUS_USERNAME}\n"\
- "PASSWORD=${NEXUS_EXCHANGE_PASSWORD}\n"\
- > /etc/taler/secrets/exchange-accountcredentials-default.secret.conf
+echo -e "[exchange-accountcredentials-default]\n" \
+ "WIRE_GATEWAY_URL=${WIRE_GATEWAY_URL}\n" \
+ "WIRE_GATEWAY_AUTH_METHOD=basic\n" \
+ "USERNAME=${LIBEUFIN_NEXUS_USERNAME}\n" \
+ "PASSWORD=${NEXUS_EXCHANGE_PASSWORD}\n" \
+ >/etc/taler/secrets/exchange-accountcredentials-default.secret.conf
chmod 400 /etc/taler/secrets/exchange-accountcredentials-default.secret.conf
chown taler-exchange-wire:taler-exchange-db /etc/taler/secrets/exchange-accountcredentials-default.secret.conf
taler-harness deployment gen-coin-config \
- --min-amount ${CURRENCY}:0.01 \
- --max-amount ${CURRENCY}:100 \
- | sed -e "s/FEE_DEPOSIT = ${CURRENCY}:0.01/FEE_DEPOSIT = ${CURRENCY}:0/" \
- > /etc/taler/conf.d/${CURRENCY}-coins.conf
-
+ --min-amount ${CURRENCY}:0.01 \
+ --max-amount ${CURRENCY}:100 |
+ sed -e "s/FEE_DEPOSIT = ${CURRENCY}:0.01/FEE_DEPOSIT = ${CURRENCY}:0/" \
+ >/etc/taler/conf.d/${CURRENCY}-coins.conf
# FIXME-DOLD: this belongs with taler-harness
-for SEC in `taler-config -c /etc/taler/conf.d/${CURRENCY}-coins.conf -S | grep COIN-`
-do
- taler-config -c /etc/taler/conf.d/${CURRENCY}-coins.conf -s $SEC -o CIPHER -V "RSA"
+for SEC in $(taler-config -c /etc/taler/conf.d/${CURRENCY}-coins.conf -S | grep COIN-); do
+ taler-config -c /etc/taler/conf.d/${CURRENCY}-coins.conf -s $SEC -o CIPHER -V "RSA"
done
say "Initializing exchange database"
@@ -170,51 +157,48 @@ echo "GRANT SELECT,INSERT,UPDATE,DELETE ON ALL TABLES IN SCHEMA exchange TO \"ta
echo "GRANT USAGE ON SCHEMA _v TO \"taler-exchange-aggregator\";" | sudo -i -u postgres psql -f - ${EXCHANGE_DB}
echo "GRANT SELECT ON ALL TABLES IN SCHEMA _v TO \"taler-exchange-aggregator\";" | sudo -i -u postgres psql -f - ${EXCHANGE_DB}
-
say "Launching exchange"
systemctl enable --now taler-exchange.target
-
say "Waiting for exchange HTTP service (/config)..."
curl --max-time 2 \
- --retry-connrefused \
- --retry-delay 1 \
- --retry 10 \
- ${EXCHANGE_BASE_URL}config &> /dev/null
+ --retry-connrefused \
+ --retry-delay 1 \
+ --retry 10 \
+ ${EXCHANGE_BASE_URL}config &>/dev/null
say "DONE"
say "Waiting for exchange management keys (this may take a while)..."
curl --max-time 30 \
- --retry-delay 1 \
- --retry 60 \
- ${EXCHANGE_BASE_URL}management/keys &> /dev/null
+ --retry-delay 1 \
+ --retry 60 \
+ ${EXCHANGE_BASE_URL}management/keys &>/dev/null
say "DONE"
-if test ${DO_OFFLINE} == y
-then
- say "Offline interaction..."
-
- sudo -i -u taler-exchange-offline \
- taler-exchange-offline \
- -c /etc/taler/taler.conf \
- download \
- sign \
- upload
-
- 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
+if test ${DO_OFFLINE} == y; then
+ say "Offline interaction..."
+
+ sudo -i -u taler-exchange-offline \
+ taler-exchange-offline \
+ -c /etc/taler/taler.conf \
+ download \
+ sign \
+ upload
+
+ 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
fi
say "Waiting for exchange /keys..."
curl --max-time 2 \
- --retry-connrefused \
- --retry-delay 1 \
- --retry 10 \
- ${EXCHANGE_BASE_URL}keys &> /dev/null
+ --retry-connrefused \
+ --retry-delay 1 \
+ --retry 10 \
+ ${EXCHANGE_BASE_URL}keys &>/dev/null
say "DONE"
say "Exchange setup finished"
diff --git a/netzbon/setup-merchant.sh b/netzbon/setup-merchant.sh
index d06c357..c647af4 100755
--- a/netzbon/setup-merchant.sh
+++ b/netzbon/setup-merchant.sh
@@ -6,6 +6,5 @@ source functions.sh
source config/user.conf
source config/internal.conf
-
say "Launching taler-merchant-httpd"
systemctl enable --now taler-merchant-httpd