update tool to follow renaming of test -> taler-bank for the taler bank wire method

This commit is contained in:
Christian Grothoff 2019-01-10 13:57:12 +01:00
parent 34c8dc504b
commit 2143266a50
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 14 additions and 14 deletions

View File

@ -12,9 +12,9 @@
# -m, --merchant (generate configuration for the merchant) # -m, --merchant (generate configuration for the merchant)
# -t, --trusted (generate configuration for exchange and merchant, with exchange set as trusted with merchant) # -t, --trusted (generate configuration for exchange and merchant, with exchange set as trusted with merchant)
# -w WIREFORMAT, --wire=WIREFORMAT (which wire plugin should we use) # -w WIREFORMAT, --wire=WIREFORMAT (which wire plugin should we use)
# --bank-url=URL (only for WIREFORMAT='test') # --bank-url=URL (only for WIREFORMAT='taler-bank')
# --exchange-bank-account=NUMBER (only for WIREFORMAT='test') # --exchange-bank-account=NUMBER (only for WIREFORMAT='taler-bank')
# --merchant-bank-account=NUMBER (only for WIREFORMAT='test') # --merchant-bank-account=NUMBER (only for WIREFORMAT='taler-bank')
########################################## ##########################################
# set an initial value for the flags # set an initial value for the flags
@ -26,7 +26,7 @@ ARG_JE=
ARG_JM= ARG_JM=
ARG_M=0 ARG_M=0
ARG_T=0 ARG_T=0
ARG_W=test ARG_W=taler-bank
ARG_BANK_URL= ARG_BANK_URL=
ARG_EXCHANGE_BANK_ACCOUNT= ARG_EXCHANGE_BANK_ACCOUNT=
ARG_MERCHANT_BANK_ACCOUNT= ARG_MERCHANT_BANK_ACCOUNT=
@ -108,32 +108,32 @@ else
fi fi
########################################## ##########################################
# Assemble JSON description of wireformat for "test" if we can # Assemble JSON description of wireformat for "taler-bank" if we can
if (test "test" = "$ARG_W") if (test "taler-bank" = "$ARG_W")
then then
if (test ! -z "$ARG_BANK_URL" -a ! -z "$ARG_MERCHANT_BANK_ACCOUNT") if (test ! -z "$ARG_BANK_URL" -a ! -z "$ARG_MERCHANT_BANK_ACCOUNT")
then then
ARG_JM="{\"type\":\"test\",\"bank_url\":\"$ARG_BANK_URL\",\"account_number\":$ARG_MERCHANT_BANK_ACCOUNT}" ARG_JM="{\"type\":\"taler-bank\",\"bank_url\":\"$ARG_BANK_URL\",\"account_number\":$ARG_MERCHANT_BANK_ACCOUNT}"
# echo "Account detail: $ARG_JM" # echo "Account detail: $ARG_JM"
else else
echo "Bank URL or account not given, skipping JSON generation for merchant" echo "Bank URL or account not given, skipping JSON generation for merchant"
fi fi
if (test ! -z "$ARG_BANK_URL" -a ! -z "$ARG_EXCHANGE_BANK_ACCOUNT") if (test ! -z "$ARG_BANK_URL" -a ! -z "$ARG_EXCHANGE_BANK_ACCOUNT")
then then
ARG_JE="{\"type\":\"test\",\"bank_url\":\"$ARG_BANK_URL\",\"account_number\":$ARG_EXCHANGE_BANK_ACCOUNT}" ARG_JE="{\"type\":\"taler-bank\",\"bank_url\":\"$ARG_BANK_URL\",\"account_number\":$ARG_EXCHANGE_BANK_ACCOUNT}"
# echo "Account detail: $ARG_JE" # echo "Account detail: $ARG_JE"
else else
echo "Bank URL or account not given, skipping JSON generation for exchange" echo "Bank URL or account not given, skipping JSON generation for exchange"
fi fi
else else
echo "Wire format is not 'test', not auto-generating JSON" echo "Wire format is not 'taler-bank', not auto-generating JSON"
fi fi
########################################### ###########################################
# Generate merchant-specific configuration # Generate merchant-specific configuration
if (test 1 = "$ARG_M") if (test 1 = "$ARG_M")
then then
MASTER_KEY=`$CS -f -s merchant -o KEYFILE` MASTER_KEY=`$CS -f -s instance-default -o KEYFILE`
# Generate master key (if missing) # Generate master key (if missing)
if (test ! -e "$MASTER_KEY") if (test ! -e "$MASTER_KEY")
@ -184,14 +184,14 @@ then
do do
$CS -s exchange-wire-$WMETHOD -o ENABLE -V YES || exit 1 $CS -s exchange-wire-$WMETHOD -o ENABLE -V YES || exit 1
# If possible, initialize outgoing wire account details ('test' method only) # If possible, initialize outgoing wire account details ('taler-bank' method only)
if (test "test" = "$WMETHOD" -a ! -z "$ARG_BANK_URL") if (test "taler-bank" = "$WMETHOD" -a ! -z "$ARG_BANK_URL")
then then
$CS -s exchange-wire-test -o BANK_URL -V "$ARG_BANK_URL" || exit 1 $CS -s exchange-wire-test -o BANK_URL -V "$ARG_BANK_URL" || exit 1
else else
echo "Skipped generating wire account details for exchange" echo "Skipped generating wire account details for exchange"
fi fi
if (test "test" = "$ARG_W" -a ! -z "$ARG_EXCHANGE_BANK_ACCOUNT") if (test "taler-bank" = "$ARG_W" -a ! -z "$ARG_EXCHANGE_BANK_ACCOUNT")
then then
$CS -s exchange-wire-test -o BANK_ACCOUNT_NUMBER -V "$ARG_EXCHANGE_BANK_ACCOUNT" || exit 1 $CS -s exchange-wire-test -o BANK_ACCOUNT_NUMBER -V "$ARG_EXCHANGE_BANK_ACCOUNT" || exit 1
else else

View File

@ -389,7 +389,7 @@ handle_mhd_request (void *cls,
* Parse the configuration to determine on which port * Parse the configuration to determine on which port
* or UNIX domain path we should run an HTTP service. * or UNIX domain path we should run an HTTP service.
* *
* @param section section of the configuration to parse ("exchange" or "exchange-admin") * @param section section of the configuration to parse (usually "exchange")
* @param[out] rport set to the port number, or 0 for none * @param[out] rport set to the port number, or 0 for none
* @param[out] unix_path set to the UNIX path, or NULL for none * @param[out] unix_path set to the UNIX path, or NULL for none
* @param[out] unix_mode set to the mode to be used for @a unix_path * @param[out] unix_mode set to the mode to be used for @a unix_path