commit 865287475d04862d43bf29a297ac59514d726410
parent 72cac18f2925dd1bc4293821bd62150994d7e944
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 4 Mar 2023 16:34:10 +0100
fixmes for idempotency
Diffstat:
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/netzbon/config_launch_libeufin.sh b/netzbon/config_launch_libeufin.sh
@@ -69,7 +69,7 @@ then
fi
export LIBEUFIN_SANDBOX_ADMIN_PASSWORD="${SANDBOX_ADMIN_PASSWORD}"
-# FIXME: this should be done inside the Debian package (incl. pw generation)
+# FIXME-CG: this should be done inside the Debian package (incl. pw generation)
# We need to add this password to the systemd environment to make it effective.
echo "LIBEUFIN_SANDBOX_ADMIN_PASSWORD=\"${SANDBOX_ADMIN_PASSWORD}\"" >> /etc/libeufin/sandbox.env
@@ -126,7 +126,7 @@ export LIBEUFIN_SANDBOX_USERNAME="exchange-at-sandbox"
export LIBEUFIN_SANDBOX_PASSWORD="${SANDBOX_EXCHANGE_PASSWORD}"
# Succeed also if the account already exists...
# (hopefully with the same password!)
-# FIXME: might be better to DELETE an existing
+# FIXME-MS: might be better to DELETE an existing
# account here instead!??
libeufin-cli \
sandbox --sandbox-url ${SANDBOX_URL} \
@@ -156,30 +156,36 @@ echo "DONE"
export LIBEUFIN_SANDBOX_USERNAME="admin"
export LIBEUFIN_SANDBOX_PASSWORD=$SANDBOX_ADMIN_PASSWORD
echo -n "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} \
- ebicshost create --host-id ${EBICS_HOST_ID}
+ ebicshost create --host-id ${EBICS_HOST_ID} || true
echo "OK"
echo -n "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} \
demobank new-ebicssubscriber \
--host-id ${EBICS_HOST_ID} \
--user-id ${EBICS_USER_ID} \
--partner-id ${EBICS_PARTNER_ID} \
- --bank-account ${LIBEUFIN_SANDBOX_USERNAME}
+ --bank-account ${LIBEUFIN_SANDBOX_USERNAME} || true
echo "OK"
echo -n "Creating the EBICS connection at Nexus..."
+# Continue on failure, request is not idempotent...
+# FIXME-MS: might be nicer to delete existing host first.
libeufin-cli connections new-ebics-connection \
--ebics-url "${SANDBOX_URL}ebicsweb" \
--host-id ${EBICS_HOST_ID} \
--partner-id ${EBICS_PARTNER_ID} \
--ebics-user-id ${EBICS_USER_ID} \
- ${EBICS_CONNECTION_NAME}
+ ${EBICS_CONNECTION_NAME} || true
echo "DONE"
echo -n "Setup EBICS keying..."