sandcastle-ng

Scripts for the deployment of Sandcastle (GNU Taler)
Log | Files | Refs | README

commit 25e8dbe7864fdaf209163fd2fc6ed5d676853527
parent d6d1a2cda42addf4199b54dd9a638323c535df77
Author: Florian Dold <florian@dold.me>
Date:   Wed,  4 Dec 2024 23:14:08 +0100

define hooks for merchant config

Diffstat:
Moverrides/head.taler.net | 13+++++++++++++
Mscripts/demo/setup-sandcastle.sh | 3+++
2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/overrides/head.taler.net b/overrides/head.taler.net @@ -1,4 +1,17 @@ +#!/usr/bin/bash + CURRENCY=KUDOS ALT_UNIT_NAME=ク MYDOMAIN=head.taler.net NAME=Kudos + +function hook_merchant_config() { + # Add the demo exchange to the accepted exchanges + cat <<EOF >>/etc/taler-merchant/conf.d/sandcastle-merchant-exchanges.conf + +[merchant-exchange-demo] +EXCHANGE_BASE_URL = https://exchange.demo.taler.net/ +MASTER_KEY = F80MFRG8HVH6R9CQ47KRFQSJP3T6DBJ4K1D9B703RJY3Z39TBMJ0 +CURRENCY = KUDOS +EOF +} diff --git a/scripts/demo/setup-sandcastle.sh b/scripts/demo/setup-sandcastle.sh @@ -680,6 +680,9 @@ MASTER_KEY = $MASTER_PUBLIC_KEY CURRENCY = $CURRENCY EOF +# Allow overrides to modify merchant config +[[ $(type -t hook_merchant_config) == function ]] && hook_merchant_config + MERCHANT_BASEURL=$PROTO://$MERCHANT_DOMAIN$PORT_SUFFIX/ systemctl enable --now taler-merchant-httpd