diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2017-11-30 16:43:22 +0100 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2017-11-30 16:44:04 +0100 |
commit | 8749671e927a2483019a39372e1167d66a330421 (patch) | |
tree | 21af9c50d36cae14be43bd64df8aa3dd1c817607 /bin | |
parent | 7dfa425953d313bb765686f5f8aa635993915c71 (diff) | |
download | deployment-8749671e927a2483019a39372e1167d66a330421.tar.gz deployment-8749671e927a2483019a39372e1167d66a330421.tar.bz2 deployment-8749671e927a2483019a39372e1167d66a330421.zip |
merging reserve topping in one script
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/taler-deployment-enable-reserve | 17 | ||||
-rwxr-xr-x | bin/taler-deployment-top-reserve | 17 |
2 files changed, 15 insertions, 19 deletions
diff --git a/bin/taler-deployment-enable-reserve b/bin/taler-deployment-enable-reserve deleted file mode 100755 index 2404a0c..0000000 --- a/bin/taler-deployment-enable-reserve +++ /dev/null @@ -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 index 33d1fd6..b5984a2 100755 --- 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") |