taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit fc9260781f3f62220fe7a724b1a56e060c1bf0c6
parent ea86ad5660ac66d94d315ba49d224511b2e9ac1d
Author: Florian Dold <florian@dold.me>
Date:   Tue, 11 Apr 2023 18:15:15 +0200

more diagnostics

Diffstat:
Mnetzbon/main.sh | 8++++----
Mnetzbon/setup-exchange.sh | 18++++++++++++++++++
2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/netzbon/main.sh b/netzbon/main.sh @@ -90,10 +90,10 @@ if test -z "${SANDBOX_EXCHANGE_PASSWORD:-}"; then echo "SANDBOX_EXCHANGE_PASSWORD=${SANDBOX_EXCHANGE_PASSWORD}" >>config/internal.conf fi -. config_launch_libeufin.sh -. config_nginx.sh -. setup-exchange.sh -. setup-merchant.sh +./config_launch_libeufin.sh +./config_nginx.sh +./setup-exchange.sh +./setup-merchant.sh # Final message to the user if test ${ENABLE_TLS:-} == "y"; then diff --git a/netzbon/setup-exchange.sh b/netzbon/setup-exchange.sh @@ -1,11 +1,29 @@ #!/bin/bash +# Set up error handling + set -eu +notify_exit() { + [[ $1 = 0 ]] || echo Script $0 failed, exit code $1 +} + +notify_err() { + echo "errexit on line $(caller)" >&2 +} + +trap '(exit 130)' INT +trap '(exit 143)' TERM +trap notify_err ERR +trap 'rc=$?; notify_exit $rc; exit $rc' EXIT + +# End of error handling setup + source functions.sh source config/user.conf source config/internal.conf + say "Beginning Exchange setup" # Required inputs: