diff options
author | Florian Dold <florian@dold.me> | 2023-04-11 18:15:15 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-04-11 18:15:15 +0200 |
commit | fc9260781f3f62220fe7a724b1a56e060c1bf0c6 (patch) | |
tree | cee9c06d19ec7d9ce8a437fb4e8fc5cdf35978bd | |
parent | ea86ad5660ac66d94d315ba49d224511b2e9ac1d (diff) | |
download | deployment-fc9260781f3f62220fe7a724b1a56e060c1bf0c6.tar.gz deployment-fc9260781f3f62220fe7a724b1a56e060c1bf0c6.tar.bz2 deployment-fc9260781f3f62220fe7a724b1a56e060c1bf0c6.zip |
more diagnostics
-rwxr-xr-x | netzbon/main.sh | 8 | ||||
-rwxr-xr-x | netzbon/setup-exchange.sh | 18 |
2 files changed, 22 insertions, 4 deletions
diff --git a/netzbon/main.sh b/netzbon/main.sh index b05af85..6a11679 100755 --- 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 index f933505..7bd27b4 100755 --- 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: |