aboutsummaryrefslogtreecommitdiff
path: root/netzbon/config_launch_libeufin.sh
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-04-12 15:29:20 +0200
committerFlorian Dold <florian@dold.me>2023-04-12 15:29:20 +0200
commit7870c134928ffc971ecc723e20b22ad492d7f2c4 (patch)
tree6d3e2ef1a23a2cb4aa56740e3ee4231691f3550e /netzbon/config_launch_libeufin.sh
parent009d693bd6ea3bbc3e64deb8d93ce7d5cffaaa72 (diff)
downloaddeployment-7870c134928ffc971ecc723e20b22ad492d7f2c4.tar.gz
deployment-7870c134928ffc971ecc723e20b22ad492d7f2c4.tar.bz2
deployment-7870c134928ffc971ecc723e20b22ad492d7f2c4.zip
netzbon: quoting
Diffstat (limited to 'netzbon/config_launch_libeufin.sh')
-rwxr-xr-xnetzbon/config_launch_libeufin.sh36
1 files changed, 18 insertions, 18 deletions
diff --git a/netzbon/config_launch_libeufin.sh b/netzbon/config_launch_libeufin.sh
index 1231378..09bf077 100755
--- a/netzbon/config_launch_libeufin.sh
+++ b/netzbon/config_launch_libeufin.sh
@@ -45,7 +45,7 @@ fi
# TODO: add sanity-checks for presence of other required env-vars
-if test ${ENABLE_TLS:-} == "y"; then
+if test "${ENABLE_TLS:-}" == "y"; then
PROTO="https"
else
PROTO="http"
@@ -68,7 +68,7 @@ echo "LIBEUFIN_NEXUS_USERNAME=\"${LIBEUFIN_NEXUS_USERNAME}\"" >>config/internal.
source /etc/libeufin/nexus.env
export LIBEUFIN_NEXUS_DB_CONNECTION
-if test -z ${LIBEUFIN_NEXUS_DB_CONNECTION:-}; then
+if test -z "${LIBEUFIN_NEXUS_DB_CONNECTION:-}"; then
say "Error: /etc/libeufin/nexus.env does not specify LIBEUFIN_NEXUS_DB_CONNECTION"
exit 1
fi
@@ -82,7 +82,7 @@ export LIBEUFIN_NEXUS_URL="http://localhost:${LIBEUFIN_NEXUS_PORT}"
. /etc/libeufin/sandbox.env
export LIBEUFIN_SANDBOX_DB_CONNECTION
-if test -z ${LIBEUFIN_SANDBOX_DB_CONNECTION:-}; then
+if test -z "${LIBEUFIN_SANDBOX_DB_CONNECTION:-}"; then
say "Error: /etc/libeufin/sandbox.env does not specify LIBEUFIN_SANDBOX_DB_CONNECTION"
exit 1
fi
@@ -105,7 +105,7 @@ sudo -E -u libeufin-sandbox \
--bank-debt-limit 1000000 \
--users-debt-limit 0 \
--without-signup-bonus \
- --currency ${CURRENCY} \
+ --currency "${CURRENCY}" \
default
say "DONE"
say "Start the bank..."
@@ -117,13 +117,13 @@ curl --max-time 25 \
--retry-connrefused \
--retry-delay 3 \
--retry 10 \
- ${SANDBOX_URL} &>/dev/null
+ "${SANDBOX_URL}" &>/dev/null
say "DONE"
say "Make one superuser at Nexus..."
sudo -E -u libeufin-nexus libeufin-nexus superuser \
${LIBEUFIN_NEXUS_USERNAME} \
- --password $NEXUS_EXCHANGE_PASSWORD
+ --password "$NEXUS_EXCHANGE_PASSWORD"
say "DONE"
say "Launching Nexus..."
@@ -135,7 +135,7 @@ curl --max-time 25 \
--retry-connrefused \
--retry-delay 3 \
--retry 10 \
- ${LIBEUFIN_NEXUS_URL} &>/dev/null
+ "${LIBEUFIN_NEXUS_URL}" &>/dev/null
say "DONE"
EXCHANGE_SANDBOX_USERNAME="exchange-at-sandbox"
@@ -147,28 +147,28 @@ export LIBEUFIN_SANDBOX_PASSWORD="${SANDBOX_EXCHANGE_PASSWORD}"
# FIXME-MS: might be better to DELETE an existing
# account here instead!??
libeufin-cli \
- sandbox --sandbox-url ${SANDBOX_URL} \
+ sandbox --sandbox-url "${SANDBOX_URL}" \
demobank register || true
say "DONE"
say "Getting the exchange IBAN and Payto URI..."
EXCHANGE_DETAILS=$(libeufin-cli \
- sandbox --sandbox-url ${SANDBOX_URL} \
+ sandbox --sandbox-url "${SANDBOX_URL}" \
demobank info --bank-account ${LIBEUFIN_SANDBOX_USERNAME})
say "DONE"
-EXCHANGE_IBAN=$(echo $EXCHANGE_DETAILS | jq -r .iban)
-EXCHANGE_PAYTO=$(echo $EXCHANGE_DETAILS | jq -r .paytoUri)
+EXCHANGE_IBAN=$(echo "$EXCHANGE_DETAILS" | jq -r .iban)
+EXCHANGE_PAYTO=$(echo "$EXCHANGE_DETAILS" | jq -r .paytoUri)
# Communicating this to the exchange script, as the exchange
# needs it for the /wire response.
export EXCHANGE_IBAN
export EXCHANGE_PAYTO
-echo "EXCHANGE_IBAN=\"${EXCHANGE_IBAN}\"" >>${MY_DIR}/config/internal.conf
-echo "EXCHANGE_PAYTO=\"${EXCHANGE_PAYTO}\"" >>${MY_DIR}/config/internal.conf
+echo "EXCHANGE_IBAN=\"${EXCHANGE_IBAN}\"" >>"${MY_DIR}"/config/internal.conf
+echo "EXCHANGE_PAYTO=\"${EXCHANGE_PAYTO}\"" >>"${MY_DIR}"/config/internal.conf
say "Setting the default exchange at Sandbox..."
-libeufin-sandbox default-exchange "${PROTO}://exchange.$DOMAIN_NAME/" $EXCHANGE_PAYTO
+libeufin-sandbox default-exchange "${PROTO}://exchange.$DOMAIN_NAME/" "$EXCHANGE_PAYTO"
say "DONE"
export LIBEUFIN_SANDBOX_USERNAME="admin"
@@ -177,7 +177,7 @@ say "Create EBICS host at Sandbox..."
# Continue on failure, request is not idempotent...
# FIXME-MS: might be nicer to delete existing host first.
libeufin-cli sandbox \
- --sandbox-url ${SANDBOX_URL} \
+ --sandbox-url "${SANDBOX_URL}" \
ebicshost create --host-id ${EBICS_HOST_ID} || true
say "OK"
@@ -185,7 +185,7 @@ say "Create exchange EBICS subscriber at Sandbox..."
# Continue on failure, request is not idempotent...
# FIXME-MS: might be nicer to delete existing host first.
libeufin-cli sandbox \
- --sandbox-url ${SANDBOX_URL} \
+ --sandbox-url "${SANDBOX_URL}" \
demobank new-ebicssubscriber \
--host-id ${EBICS_HOST_ID} \
--user-id ${EBICS_USER_ID} \
@@ -226,13 +226,13 @@ say "Create the Taler facade at Nexus..."
# FIXME-MS: might be nicer to delete existing facade first.
libeufin-cli facades \
new-taler-wire-gateway-facade \
- --currency $CURRENCY \
+ --currency "$CURRENCY" \
--facade-name ${LIBEUFIN_TALER_FACADE} \
${EBICS_CONNECTION_NAME} ${LIBEUFIN_NEXUS_USERNAME} || true
say "OK"
export WIRE_GATEWAY_URL="${LIBEUFIN_NEXUS_URL}/facades/${LIBEUFIN_TALER_FACADE}/taler-wire-gateway/"
-echo "WIRE_GATEWAY_URL=\"${WIRE_GATEWAY_URL}\"" >>${MY_DIR}/config/internal.conf
+echo "WIRE_GATEWAY_URL=\"${WIRE_GATEWAY_URL}\"" >>"${MY_DIR}"/config/internal.conf
say "Configuring the background jobs to submit/get transactions..."
# Tries every second.