gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-mdb] branch master updated: add FAIL_COMMAND option


From: gnunet
Subject: [taler-taler-mdb] branch master updated: add FAIL_COMMAND option
Date: Sat, 13 Jan 2024 23:50:55 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository taler-mdb.

The following commit(s) were added to refs/heads/master by this push:
     new 7463564  add FAIL_COMMAND option
7463564 is described below

commit 74635648a0c6ab901dcbbd5a69a605a5fb29e0e6
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Jan 13 23:50:47 2024 +0100

    add FAIL_COMMAND option
---
 contrib/taler-mdb-network-check.sh | 5 ++++-
 debian/etc/taler-mdb.conf          | 3 +++
 debian/taler-mdb.service           | 2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/contrib/taler-mdb-network-check.sh 
b/contrib/taler-mdb-network-check.sh
index ee6e842..4c36295 100755
--- a/contrib/taler-mdb-network-check.sh
+++ b/contrib/taler-mdb-network-check.sh
@@ -38,7 +38,6 @@ function exit_fail() {
 }
 
 CONF="$HOME/.config/taler.conf"
-FAIL_PROG="echo"
 
 # Parse command-line options
 while getopts ':c:f:h' OPTION; do
@@ -65,6 +64,10 @@ shift $((OPTIND - 1))
 
 dig -h > /dev/null || exit_fail "'dig' is required"
 
+if [[ ${FAIL_PROG:-} = "" ]]
+then
+    FAIL_PROG=$(taler-config -c "$CONF" -s taler-mdb -o "FAIL_HELPER")
+fi
 
 # Cleanup to run whenever we exit
 function cleanup()
diff --git a/debian/etc/taler-mdb.conf b/debian/etc/taler-mdb.conf
index da0a2d2..94dfcdd 100644
--- a/debian/etc/taler-mdb.conf
+++ b/debian/etc/taler-mdb.conf
@@ -10,6 +10,9 @@ BACKEND_AUTHORIZATION = "Bearer secret-token:sandbox"
 # Message to diplay after purchase is completed,
 FULFILLMENT_MSG = Enjoy your ${PRODUCT_DESCRIPTION}
 
+# Command to run to show failures.
+FAIL_COMMAND = taler-mdb-show.sh -c /etc/taler-mdb.conf
+
 # Name of the UART where the MDB connector is reachable.
 UART_DEVICE = /dev/ttyAMA0
 
diff --git a/debian/taler-mdb.service b/debian/taler-mdb.service
index ec2c8cb..e1855fa 100644
--- a/debian/taler-mdb.service
+++ b/debian/taler-mdb.service
@@ -5,7 +5,7 @@ Description=GNU Taler Multi-Drop-Bus application
 User=root
 Type=simple
 Restart=on-failure
-ExecStart=/usr/bin/taler-mdb-network-check.sh -c /etc/taler-mdb.conf -f 
'/usr/bin/taler-mdb-show.sh -c /etc/taler-mdb.conf' /usr/bin/taler-mdb -c 
/etc/taler-mdb.conf
+ExecStart=/usr/bin/taler-mdb-network-check.sh -c /etc/taler-mdb.conf -- 
/usr/bin/taler-mdb -c /etc/taler-mdb.conf
 StandardOutput=inherit
 StandardError=inherit
 Restart=always

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]