gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] branch master updated: notes


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated: notes
Date: Fri, 06 Sep 2019 03:08:29 +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 07502333 notes
07502333 is described below

commit 07502333a715401c5412781b07079a42ceb50e36
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Sep 6 03:08:23 2019 +0200

    notes
---
 src/auditor/generate-auditor-basedb.sh | 43 +++++++++++++++++++++++++++-------
 1 file changed, 35 insertions(+), 8 deletions(-)

diff --git a/src/auditor/generate-auditor-basedb.sh 
b/src/auditor/generate-auditor-basedb.sh
index fafb6f03..f95991e3 100755
--- a/src/auditor/generate-auditor-basedb.sh
+++ b/src/auditor/generate-auditor-basedb.sh
@@ -11,23 +11,46 @@
 #
 set -eu
 
-# Configuation file will be edited, so we create one
-# from the template.
-CONF=generate-auditor-basedb-prod.conf
-cp generate-auditor-basedb-template.conf $CONF
+# Exit, with status code "skip" (no 'real' failure)
+function exit_skip() {
+    echo $1
+    exit 77
+}
+
+# Where do we write the result?
+BASEDB=${1:-"auditor-basedb"}
 
 # Name of the Postgres database we will use for the script.
 # Will be dropped, do NOT use anything that might be used
 # elsewhere
 TARGET_DB=taler-auditor-basedb
 
+# FIXME: try to generate DB from scratch, fall back
+# to pre-generated DB if generate-auditor-basedb.sh
+# fails with status code 77!
+
+# Configuation file will be edited, so we create one
+# from the template.
+CONF=generate-auditor-basedb-prod.conf
+cp generate-auditor-basedb-template.conf $CONF
+
+
+echo -n "Testing for taler-bank-manage"
+taler-bank-manage -h >/dev/null </dev/null || exit_skip " MISSING"
+echo " FOUND"
+echo "Testing for taler-wallet-cli"
+taler-wallet-cli -h >/dev/null </dev/null || exit_skip " MISSING"
+echo " FOUND"
+
+
+
 # Clean up
 DATA_DIR=`taler-config -f -c $CONF -s PATHS -o TALER_HOME`
 rm -rf $DATA_DIR || true
 
 # reset database
 dropdb $TARGET_DB >/dev/null 2>/dev/null || true
-createdb $TARGET_DB
+createdb $TARGET_DB || exit_skip "Could not create database $TARGET_DB"
 
 # obtain key configuration data
 MASTER_PRIV_FILE=`taler-config -f -c $CONF -s EXCHANGE -o MASTER_PRIV_FILE`
@@ -69,6 +92,10 @@ taler-exchange-httpd -c $CONF 2> taler-exchange-httpd.log &
 taler-merchant-httpd -c $CONF 2> taler-merchant-httpd.log &
 taler-exchange-wirewatch -c $CONF 2> taler-exchange-wirewatch.log &
 
+
+# FIXME: also launch taler-auditor-httpd!
+
+# FIXME: interactive test here instead of waiting!
 sleep 10
 
 # run wallet CLI
@@ -80,12 +107,12 @@ kill `jobs -p`
 
 # Dump database
 echo "Dumping database"
-pg_dump -O $TARGET_DB | sed -e '/AS integer/d' > auditor-basedb.sql
+pg_dump -O $TARGET_DB | sed -e '/AS integer/d' > ${BASEDB}.sql
 
-echo $MASTER_PUB > auditor-basedb.mpub
+echo $MASTER_PUB > ${BASEDB}.mpub
 
 WIRE_FEE_DIR=`taler-config -c $CONF -f -s exchangedb -o WIREFEE_BASE_DIR`
-cp $WIRE_FEE_DIR/x-taler-bank.fee auditor-basedb.fees
+cp $WIRE_FEE_DIR/x-taler-bank.fee ${BASEDB}.fees
 
 # clean up
 echo "Final clean up"

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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