summaryrefslogtreecommitdiff
path: root/bin/taler-deployment-keyup
blob: 6c16586b1a76873145265f684e929d98a6e50e00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash

set -eu

auditor_request=${HOME}/shared-data/exchange/auditor-request/auditor_request
if [[ ${TALER_CONFIG_STANDALONE:-0} = 1 ]]; then
  # no auditor on env deployments for now
  taler-exchange-keyup \
    -m ~/shared-data/exchange/offline-keys/master.priv
else
  taler-exchange-keyup \
    -m ~/shared-data/exchange/offline-keys/master.priv \
    -o $auditor_request
fi

auditor_base_dir=$(taler-config -s exchangedb -o auditor_base_dir -f)
exchange_master_pub=$(taler-config -s exchange -o master_public_key)
auditor_sig_output_file=$(date "+%s%N")
taler-auditor-sign -u https://auditor.taler.net/ -m $exchange_master_pub -r $auditor_request -o "$auditor_base_dir/$auditor_sig_output_file"
if [[ 0 != $? ]]; then
  echo Auditor signing not accomplished.
fi

chmod -fR g+rw ~/shared-data