summaryrefslogtreecommitdiff
path: root/netzbon
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-04-11 17:20:58 +0200
committerFlorian Dold <florian@dold.me>2023-04-11 17:20:58 +0200
commitea86ad5660ac66d94d315ba49d224511b2e9ac1d (patch)
treefab7316044faacb0167f2acd214ff6479d48f562 /netzbon
parent98863bf67c61ea62574de43914107f443dabdfd2 (diff)
downloaddeployment-ea86ad5660ac66d94d315ba49d224511b2e9ac1d.tar.gz
deployment-ea86ad5660ac66d94d315ba49d224511b2e9ac1d.tar.bz2
deployment-ea86ad5660ac66d94d315ba49d224511b2e9ac1d.zip
add diagnostics
Diffstat (limited to 'netzbon')
-rwxr-xr-xnetzbon/setup-exchange.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/netzbon/setup-exchange.sh b/netzbon/setup-exchange.sh
index 86ee031..f933505 100755
--- a/netzbon/setup-exchange.sh
+++ b/netzbon/setup-exchange.sh
@@ -38,6 +38,14 @@ if test -z ${EXCHANGE_PAYTO:-}; then
exit 1
fi
+function die() {
+ say $1
+ exit 1
+}
+
+# Just try if sudo works for diagnostics
+sudo -i -u taler-exchange-offline id >/dev/null || die "Error: Unable to switch to taler-exchange-offline user"
+
# Create master key as taler-exchange-offline *unless* user already
# set the MASTER_PUBLIC_KEY to some value we can use.
export MASTER_PRIV_DIR=.local/share/taler/exchange/offline-keys
@@ -54,7 +62,7 @@ if test -z ${MASTER_PUBLIC_KEY:-}; then
"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)
+ MASTER_PUBLIC_KEY=$(sudo -i -u taler-exchange-offline taler-exchange-offline -LDEBUG setup)
echo "MASTER_PUBLIC_KEY=\"${MASTER_PUBLIC_KEY}\"" >>config/user.conf
if test -z ${DO_OFFLINE:-}; then
# Set 'DO_OFFLINE'