gnunet-svn
[Top][All Lists]
Advanced

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

[taler-grid5k] 117/141: start processes with argument to script


From: gnunet
Subject: [taler-grid5k] 117/141: start processes with argument to script
Date: Thu, 18 Nov 2021 14:50:58 +0100

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

marco-boss pushed a commit to branch master
in repository grid5k.

commit 30abb59411ff00d43db6ec994422e5001ac4e151
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Tue Nov 9 14:15:10 2021 +0100

    start processes with argument to script
---
 experiment/env                 |  7 +++++--
 experiment/scripts/exchange.sh | 10 ++++++----
 experiment/scripts/wallet.sh   |  7 +++++--
 3 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/experiment/env b/experiment/env
index a6658ee..870389a 100755
--- a/experiment/env
+++ b/experiment/env
@@ -31,13 +31,16 @@ DB_PASSWORD=
 
 NUM_WALLET_HOSTS=3
 
-# Number of wallets to start in parallel per host
+# Initial number of wallets to start in parallel per host
 # This is a bulk size
 # running ./root/scripts/wallet.sh again will start another bulk
 # default = 10
+# Start another bunch with ./wallet.sh <NUN>
 NUM_WALLET_PROCESSES=10
 
-# Number of exchange processes to run
+# Initial number of exchange processes to run
+# default = 10
+# Start another bunch with ./exchange.sh <NUM> AND ./proxy.sh <NUM>
 NUM_EXCHANGE_PROCESSES=1
 
 # If prometheus node exporter should be enabled
diff --git a/experiment/scripts/exchange.sh b/experiment/scripts/exchange.sh
index 9c74b90..aed0c46 100755
--- a/experiment/scripts/exchange.sh
+++ b/experiment/scripts/exchange.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-set -ex
+set -eux
 
 if [[ "$1" == "init" ]];
 then   
@@ -24,7 +24,8 @@ then
   sleep 1
 
   systemctl restart taler-exchange.target
-  let "NUM_EXCHANGE_PROCESSES-=1"
+
+  NUM_PROCESSES=$((${NUM_EXCHANGE_PROCESSES:-10}-1))
 
   wait_for_keys "${EXCHANGE_DOMAIN}/management"
   
@@ -35,12 +36,13 @@ then
   taler-exchange-offline upload < sig-res.json
   taler-exchange-offline upload < acct-res.json
   taler-exchange-offline upload < fee-res.json
-
+else
+  NUM_PROCESSES=$1
 fi
   
 RUNNING=$(ps -aux | grep "[taler]-exchange-httpd" | wc -l)
 
-for i in $(seq ${NUM_EXCHANGE_PROCESSES});
+for i in $(seq ${NUM_PROCESSES});
 do
   let "i+=${RUNNING}-1"
   systemctl restart taler-exchange-httpd@100"${i}".socket 
taler-exchange-httpd@100"${i}".service
diff --git a/experiment/scripts/wallet.sh b/experiment/scripts/wallet.sh
index f53e93a..354c7fa 100755
--- a/experiment/scripts/wallet.sh
+++ b/experiment/scripts/wallet.sh
@@ -1,6 +1,5 @@
 #!/bin/bash
-
-NUM_PROCESSES=${NUM_WALLET_PROCESSES:-10}
+set -eux
 
 if [[ "$1" == "init" ]];  
 then
@@ -9,12 +8,16 @@ then
   wait_for_keys "${PROXY_DOMAIN}"
   sleep 5
 
+  NUM_PROCESSES=${NUM_WALLET_PROCESSES:-10}
+
   if [ "$NUM_PROCESSES" -gt "0" ];
   then
     # Start one process with logging enabled
     let "NUM_PROCESSES-=1"
     systemctl restart taler-wallet@logging.service
   fi
+else
+  NUM_PROCESSES=$1
 fi
 
 # count the running wallets

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