gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: new -W option for unified setup


From: gnunet
Subject: [taler-exchange] branch master updated: new -W option for unified setup
Date: Wed, 21 Jun 2023 23:14:00 +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 ef6496ab new -W option for unified setup
ef6496ab is described below

commit ef6496aba56dd2472a61670f91ca2896022a45b7
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Jun 21 23:13:57 2023 +0200

    new -W option for unified setup
---
 src/testing/taler-unified-setup.sh | 43 +++++++++++++++++++++++++++-----------
 1 file changed, 31 insertions(+), 12 deletions(-)

diff --git a/src/testing/taler-unified-setup.sh 
b/src/testing/taler-unified-setup.sh
index 8f97b440..2602bca0 100755
--- a/src/testing/taler-unified-setup.sh
+++ b/src/testing/taler-unified-setup.sh
@@ -29,19 +29,21 @@ set -eu
 
 # Exit, with status code "skip" (no 'real' failure)
 function exit_skip() {
-    echo " SKIP: " "$@"
+    echo " SKIP: " "$@" >&2
     exit 77
 }
 
 # Exit, with error message (hard failure)
 function exit_fail() {
-    echo " FAIL: " "$@"
+    echo " FAIL: " "$@" >&2
     exit 1
 }
 
 # Cleanup to run whenever we exit
 function cleanup()
 {
+    echo "Taler unified setup terminating!" >&2
+
     for n in $(jobs -p)
     do
         kill $n 2> /dev/null || true
@@ -53,6 +55,7 @@ function cleanup()
 # Install cleanup handler (except for kill -9)
 trap cleanup EXIT
 
+WAIT_FOR_SIGNAL=0
 START_AUDITOR=0
 START_BACKUP=0
 START_EXCHANGE=0
@@ -71,7 +74,7 @@ LOGLEVEL="DEBUG"
 DEFAULT_SLEEP="0.2"
 
 # Parse command-line options
-while getopts ':abc:d:efghl:mnr:stu:vw' OPTION; do
+while getopts ':abc:d:efghl:mnr:stu:vwW' OPTION; do
     case "$OPTION" in
         a)
             START_AUDITOR="1"
@@ -142,6 +145,9 @@ while getopts ':abc:d:efghl:mnr:stu:vw' OPTION; do
         w)
             START_WIREWATCH="1"
             ;;
+        W)
+            WAIT_FOR_SIGNAL="1"
+            ;;
         ?)
         exit_fail "Unrecognized command line option"
         ;;
@@ -218,14 +224,17 @@ register_sandbox_account() {
 }
 
 
-BANK_PORT=$(taler-config -c "$CONF" -s "BANK" -o "HTTP_PORT")
-if [ "1" = "$START_NEXUS" ]
+if [[ "1" = "$START_NEXUS" || "1" = "$START_FAKEBANK" ]]
 then
-    NEXUS_PORT="$BANK_PORT"
-    SANDBOX_PORT="1$BANK_PORT"
-else
-    NEXUS_PORT="0"
-    SANDBOX_PORT="1$BANK_PORT"
+    BANK_PORT=$(taler-config -c "$CONF" -s "BANK" -o "HTTP_PORT")
+    if [ "1" = "$START_NEXUS" ]
+    then
+        NEXUS_PORT="$BANK_PORT"
+        SANDBOX_PORT="1$BANK_PORT"
+    else
+        NEXUS_PORT="0"
+        SANDBOX_PORT="1$BANK_PORT"
+    fi
 fi
 
 if [ "1" = "$START_SANDBOX" ]
@@ -694,7 +703,17 @@ fi
 # Signal caller that we are ready.
 echo "<<READY>>"
 
-# Wait until caller stops us.
-read
+if [ "1" = "$WAIT_FOR_SIGNAL" ]
+then
+    while true
+    do
+        sleep 0.1
+    done
+else
+    # Wait until caller stops us.
+    read
+fi
+
+echo "Taler unified setup terminating!" >&2
 
 exit 0

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