[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated: Enable rewards checking balanc
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated: Enable rewards checking balance script using HOST Systemd timer |
Date: |
Wed, 20 Sep 2023 10:48:45 +0200 |
This is an automated email from the git hooks/post-receive script.
javier-sepulveda pushed a commit to branch master
in repository deployment.
The following commit(s) were added to refs/heads/master by this push:
new d2cf8b5 Enable rewards checking balance script using HOST Systemd
timer
d2cf8b5 is described below
commit d2cf8b5af2308cbb36cbf2f90fc8bae941112cfb
Author: Javier Sepulveda <javier.sepulveda@uv.es>
AuthorDate: Wed Sep 20 10:48:14 2023 +0200
Enable rewards checking balance script using HOST Systemd timer
---
sandcastle/README | 16 ++++++++++++----
sandcastle/systemd/fund-rewards.service | 10 ++++++++++
sandcastle/systemd/fund-rewards.timer | 11 +++++++++++
sandcastle/utils/enable-services.sh | 8 ++++++++
4 files changed, 41 insertions(+), 4 deletions(-)
diff --git a/sandcastle/README b/sandcastle/README
index 9dc7d72..b114ddf 100644
--- a/sandcastle/README
+++ b/sandcastle/README
@@ -72,21 +72,29 @@ $ docker compose up $image-name
'bank', 'exchange', 'merchant', 'talerdb' are valid values
for $image-name.
-Enabling tipping
+Enabling rewards
================
-The following command manually creates a tipping reserve:
+The following command (executed from the container CLI) manually creates a
rewards reserve:
$ taler-harness deployment tip-topup --merchant-url
https://backend.demo.taler.net/instances/survey/
--merchant-apikey=$MERCHANT_APIKEY --bank-access-url
https://bank.demo.taler.net/demobanks/default/access-api/ --wire-method=iban
--amount=KUDOS:5000 --bank-account=survey-at-sandbox
--bank-password=$SURVEY_SECRET --exchange-url https://exchange.demo.taler.net/
-The status of tipping reserves can be checked via:
+The status of the rewards reserves can be checked via:
$ taler-harness deployment tip-status --merchant-url
https://backend.demo.taler.net/instances/survey/
--merchant-apikey=$MERCHANT_APIKEY
-To purge all non-funded tipping reserves, run:
+To purge all non-funded rewards reserves, run:
$ taler-harness deployment tip-cleanup --merchant-url
https://backend.demo.taler.net/instances/survey/
--merchant-apikey=$MERCHANT_APIKEY
+[*] - To enable the "rewards balance checking" script. Please execute after
doing the "docker compose up" the next command from,
+the "deployment/sandcastle" directory.
+
+./utils/enable-services.sh
+
+This will put to run a systemd service, which will check the rewards balance
once per week (this can be change editing
+the systemd/fund-rewards.timer).
+
How to run
==========
diff --git a/sandcastle/systemd/fund-rewards.service
b/sandcastle/systemd/fund-rewards.service
new file mode 100644
index 0000000..faa4c37
--- /dev/null
+++ b/sandcastle/systemd/fund-rewards.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=fund rewards
+
+[Service]
+Type=oneshot
+WorkingDirectory=%h/deployment/sandcastle
+ExecStart=/usr/bin/docker compose exec exchange bash -c "/fund-rewards.sh"
+
+[Install]
+WantedBy=default.target
diff --git a/sandcastle/systemd/fund-rewards.timer
b/sandcastle/systemd/fund-rewards.timer
new file mode 100644
index 0000000..c69eeab
--- /dev/null
+++ b/sandcastle/systemd/fund-rewards.timer
@@ -0,0 +1,11 @@
+[Unit]
+Description=Run fund rewards script
+Requires=fund-rewards.service
+
+[Timer]
+Unit=fund-rewards.service
+OnCalendar=weekly
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/sandcastle/utils/enable-services.sh
b/sandcastle/utils/enable-services.sh
new file mode 100755
index 0000000..2d73bf7
--- /dev/null
+++ b/sandcastle/utils/enable-services.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+
+# Copy the fund-rewards.service and fund-rewards.timer files, to the host
systemd folder
+
+cp systemd/fund-rewards.* ~/.config/systemd/user
+
+systemctl --user enable --now fund-rewards.timer
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-deployment] branch master updated: Enable rewards checking balance script using HOST Systemd timer,
gnunet <=