summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-04-23 22:44:00 +0200
committerChristian Grothoff <christian@grothoff.org>2023-04-23 22:44:00 +0200
commit10c287ab50fcf06593cc6131fa667aba445dc041 (patch)
tree6173016f74c19f26de59d276aff038884ee828b8
parent561a68c7de56113e4a7287402aee1951de5b1f0d (diff)
downloadgrid5k-10c287ab50fcf06593cc6131fa667aba445dc041.tar.gz
grid5k-10c287ab50fcf06593cc6131fa667aba445dc041.tar.bz2
grid5k-10c287ab50fcf06593cc6131fa667aba445dc041.zip
update for API change as per #6363
-rwxr-xr-xexperiment/scripts/merchant.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/experiment/scripts/merchant.sh b/experiment/scripts/merchant.sh
index 1ec68a2..86e8f3f 100755
--- a/experiment/scripts/merchant.sh
+++ b/experiment/scripts/merchant.sh
@@ -17,13 +17,13 @@ cd /tmp
# Configurre the merchants files in /etc/taler
function configure_merchant() {
wait_for_keys "${EXCHANGE_GW_DOMAIN}"
-
+
MASTER_KEY=$(
curl -k -f \
"${EXCHANGE_GW_DOMAIN}/keys" \
| jq -r '.master_public_key'
)
-
+
sed -i -e "s\<EXCHANGE_URL_HERE>\http://${EXCHANGE_GW_DOMAIN}/\g" \
-e "s/<EXCHANGE_MASTER_KEY_HERE>/${MASTER_KEY}/g" \
/etc/taler/conf.d/merchant.conf
@@ -35,7 +35,7 @@ function configure_db() {
echo "
host all postgres 172.16.0.0/12 trust
" >> /etc/postgresql/${POSTGRES_VERSION}/main/pg_hba.conf
-
+
# Listen on all interfaces so the monitors db exporter can reach the db
echo "
listen_addresses='*'
@@ -43,10 +43,10 @@ function configure_db() {
" >> /etc/postgresql/${POSTGRES_VERSION}/main/postgresql.conf
}
-# Start postgres an initialize the merchant's database
+# Start postgres an initialize the merchant's database
function init_db() {
systemctl restart postgresql
-
+
su postgres << EOF
psql postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='taler-merchant-httpd'" | \
grep -q 1 || \
@@ -68,7 +68,7 @@ function create_instance() {
-H "Authorization: Bearer secret-token:${TALER_MERCHANT_TOKEN}" \
-H "Content-Type: application/json" \
-d "{
- \"payto_uris\": [ \"payto://x-taler-bank/bank.${DNS_ZONE}/${1}?receiver-name=${1}\" ],
+ \"accounts\": [{\"payto_uri\":\"payto://x-taler-bank/bank.${DNS_ZONE}/${1}?receiver-name=${1}\"}],
\"id\": \"${1}\",
\"name\": \"${1}\",
\"address\": {\"country\": \"CH\"},
@@ -100,7 +100,7 @@ function init_merchant() {
create_instance ${NODE_NAME}
}
-case $1 in
+case $1 in
init)
init_merchant
;;