gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: nicer process killing


From: gnunet
Subject: [taler-exchange] branch master updated: nicer process killing
Date: Fri, 28 Aug 2020 18:30:46 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 1ef97351 nicer process killing
1ef97351 is described below

commit 1ef9735115730c5d236791ce0c4353d548110159
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Aug 28 18:30:44 2020 +0200

    nicer process killing
---
 src/auditor/generate-revoke-basedb.sh | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/src/auditor/generate-revoke-basedb.sh 
b/src/auditor/generate-revoke-basedb.sh
index 5ec1f5ca..71af4fde 100755
--- a/src/auditor/generate-revoke-basedb.sh
+++ b/src/auditor/generate-revoke-basedb.sh
@@ -7,8 +7,18 @@
 #
 set -eu
 
+# Cleanup to run whenever we exit
+function cleanup()
+{
+    for n in `jobs -p`
+    do
+        kill $n 2> /dev/null || true
+    done
+    wait
+}
 
-trap "kill `jobs -p` &> /dev/null || true" ERR
+# Install cleanup handler (except for kill -9)
+trap cleanup EXIT
 
 # Exit, with status code "skip" (no 'real' failure)
 function exit_skip() {
@@ -131,12 +141,16 @@ done
 
 if [ 1 != $OK ]
 then
-    kill `jobs -p`
-    wait
+    cleanup
     exit_skip "Failed to launch services"
 fi
 echo " DONE"
 
+# Setup merchant
+
+curl -H "Content-Type: application/json" -X POST -d 
'{"payto_uris":["payto://x-taler-bank/localhost:8082/43"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1",
 
"default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_ms"
 : 3600000},"default_pay_delay":{"d_ms": 3600000}}' 
http://localhost:9966/private/instances
+
+
 # run wallet CLI
 echo "Running wallet"
 
@@ -303,8 +317,7 @@ taler-wallet-cli $TIMETRAVEL --wallet-db=$WALLET_DB 
run-until-done
 echo "Bought something with refresh-recouped coin"
 
 echo "Shutting down services"
-kill `jobs -p`
-wait
+cleanup
 
 
 # Dump database

-- 
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]