summaryrefslogtreecommitdiff
path: root/bin/taler-deployment-keyup
diff options
context:
space:
mode:
Diffstat (limited to 'bin/taler-deployment-keyup')
-rwxr-xr-xbin/taler-deployment-keyup21
1 files changed, 11 insertions, 10 deletions
diff --git a/bin/taler-deployment-keyup b/bin/taler-deployment-keyup
index 8e8ff62..a05ad6c 100755
--- a/bin/taler-deployment-keyup
+++ b/bin/taler-deployment-keyup
@@ -14,20 +14,21 @@ if test -z $TALER_CONFIG_ENV; then
fi
auditor_request_dir=${HOME}/shared-data/exchange/auditor-request/
+
mkdir -p $auditor_request_dir
taler-exchange-keyup \
-m ${HOME}/shared-data/exchange/offline-keys/master.priv \
-o $auditor_request_dir/auditor_request
-taler-auditor-sign \
- -u $TALER_ENV_URL_AUDITOR \
- -m $(taler-config -s exchange -o master_public_key) \
- -r "$auditor_request_dir/auditor_request" \
- -o "$(taler-config -s exchangedb -o auditor_base_dir -f)/$(date +%s%N)" \
- -c ${HOME}/.config/taler.conf
-
-if [[ 0 != $? ]]; then
- echo Auditor signing not accomplished.
-fi
+# Checks whether any denom key was generated, and
+# only sign it if so.
+if [[ -s $auditor_request_dir/auditor_request ]]; then
+ echo "There key material for the auditor to sign"
+ taler-auditor-sign \
+ -u $TALER_ENV_URL_AUDITOR \
+ -m $(taler-config -s exchange -o master_public_key) \
+ -r "$auditor_request_dir/auditor_request" \
+ -o "$(taler-config -s exchangedb -o auditor_base_dir -f)/$(date +%s%N)" \
+ -c ${HOME}/.config/taler.conf
chmod -fR g+rw ${HOME}/shared-data