taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit 3e9205074f9e683f50d3c8e7204cb582fa33791c
parent 735a4c97ac0bc0bdbfe317ce6859f139e5cd7b8a
Author: Florian Dold <florian.dold@gmail.com>
Date:   Fri, 30 Aug 2019 10:28:47 +0200

fix reserve topping script

Diffstat:
Mbin/taler-deployment-top-reserve | 23+++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/bin/taler-deployment-top-reserve b/bin/taler-deployment-top-reserve @@ -1,4 +1,6 @@ -#!/bin/bash +#!/usr/bin/env bash + +set -eu if test -z $TALER_ENV_NAME || test -z $TALER_CONFIG_CURRENCY; then echo "Please source ~/activate" @@ -8,11 +10,15 @@ fi # %N is current nanoseconds. UUID=$(date +"uuid-%N") -RESERVE=$(gnunet-ecc -p $( \ - printf "%s%s" \ - $(taler-config -s PATHS -o TALER_DEPLOYMENT_SHARED -f) \ - /merchant/default-tip.priv)) +instance=default + +reserve_priv_filename=$(taler-config -s "instance-$instance" -o tip_reserve_priv_filename -f) + +echo "Reading tipping reserve private key from $reserve_priv_filename" +RESERVE=$(gnunet-ecc -p "$reserve_priv_filename") + +failed=0 taler-bank-transfer \ --amount="$TALER_CONFIG_CURRENCY:100.00" \ --bank="https://bank.$TALER_ENV_NAME.taler.net/" \ @@ -21,9 +27,10 @@ taler-bank-transfer \ --log="INFO" \ --pass="x" \ --subject=$RESERVE \ - --user="Survey" + --user="Survey" || failed=1 -if ! test 0 = $?; then - echo Wire transfering failed! +if [[ $failed = 1 ]]; then + echo Wire transfer failed! exit 1 fi +