summaryrefslogtreecommitdiff
path: root/bin/taler-deployment-sign
blob: c5ea621fc63b3f69285161352d21b320115f0dce (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
25
#!/usr/bin/env bash

# Sign exchange wire response

set -eu

if test -z $TALER_CONFIG_ENV; then
  echo Please run 'source $HOME/activate' first.
  exit 1
fi

if ! test -f $HOME/.config/taler.conf; then
  echo "Please generate config file first (taler-deployment-config-generate)"
  exit 1
fi

WIRE_RESPONSE=$(taler-config -s account-1 -o wire_response -f)

if test -e "$WIRE_RESPONSE"; then
  echo "Will not override that wire response file ($WIRE_RESPONSE); exiting."
  exit 0
fi

taler-exchange-wire
chmod 770 $WIRE_RESPONSE