taler-deployment

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

commit 8749671e927a2483019a39372e1167d66a330421
parent 7dfa425953d313bb765686f5f8aa635993915c71
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Thu, 30 Nov 2017 16:43:22 +0100

merging reserve topping in one script

Diffstat:
Dbin/taler-deployment-enable-reserve | 17-----------------
Mbin/taler-deployment-top-reserve | 17+++++++++++++++--
Mbuildbot/top_reserve.sh | 2+-
3 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/bin/taler-deployment-enable-reserve b/bin/taler-deployment-enable-reserve @@ -1,17 +0,0 @@ -#!/bin/bash - -# This file is run only ONCE - and acts more like a recipe! -# That's because a reserve cannot get its deadline changed, -# so even though we top periodically the same reserve (with -# taler-exchange-reservemod), we can't likewise move in the -# future that reserve's expiration date; thus we pick a very -# distant time for it. - -source $HOME/activate - -taler-merchant-tip-enable \ - --amount="$TALER_CONFIG_CURRENCY:100.00" \ - --backend-uri="http://backend.$TALER_ENVNAME.taler.net/" \ - --credit-uuid=ZUV321 \ # do not change - --instance=default \ - --expiration=2020-12-31 diff --git a/bin/taler-deployment-top-reserve b/bin/taler-deployment-top-reserve @@ -1,12 +1,25 @@ #!/bin/bash -source $HOME/activate +if test -z $TALER_ENVNAME || test -z $TALER_CONFIG_CURRENCY; then + echo "Please source ~/activate" + exit 1 +fi + +# %N is current nanoseconds. +UUID=$(date +"uuid-%N") taler-exchange-reservemod \ --add="$TALER_CONFIG_CURRENCY:100.0" \ --reserve=S98FEXHW3VJ93EA73CRAQ5E8E4DJE96Z9JXYFHFD169FWS9NS8A0 \ --sender='{"bank_uri":"https://bank.$TALER_ENVNAME.taler.net/","account_number":7,"type":"test"}' \ - --transfer='ZUV321' + --transfer=$UUID # note: account number (7) is hardcoded, as tipping # is only being tested against the 'default' instance. + +taler-merchant-tip-enable \ + --amount="$TALER_CONFIG_CURRENCY:100.00" \ + --backend-uri="http://backend.$TALER_ENVNAME.taler.net/" \ + --credit-uuid=$UUID \ + --instance=default \ + --expiration=$(date --date="2 weeks" +"%Y-%m-%d") diff --git a/buildbot/top_reserve.sh b/buildbot/top_reserve.sh @@ -2,4 +2,4 @@ active=$(sudo -u test cat /home/test/active) -sudo -u $active bash -c 'taler-deployment-top-reserve' +sudo -u $active bash -c 'source $HOME/activate; taler-deployment-top-reserve'