From 7f9d1c34760135a2384874c61ef2cf5f6befc10a Mon Sep 17 00:00:00 2001
From: Carmelo Pellegrino <carmelo.pellegrino@gmail.com>
Date: Mon, 25 May 2015 16:00:23 +0200
Subject: [PATCH] new cmd line parameter added (daq server host)

---
 daq.sh | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/daq.sh b/daq.sh
index ba7b775..7b265e1 100755
--- a/daq.sh
+++ b/daq.sh
@@ -7,20 +7,19 @@
 # Author: Carmelo Pellegrino <carmelo.pellegrino@bo.infn.it>
 #
 
-if [ $# -ne 4 ]; then
-  echo ERROR:
-  echo Syntax: $0 <run_number> <run_start_time> <run_duration_in_sec>
+if [ $# -ne 5 ]; then
+  echo "ERROR:"
+  echo "Syntax: $0 <run_number> <run_start_time> <run_duration_in_sec> <ip of the DAQ server>"
   exit -1
 fi
 
 RUN_NUMBER=$1
 RUN_START_TIME=$2
 RUN_DURATION=$3
-date
-echo Starting DU1 DAQ for RUN $RUN
+DAQ_SERVER=$4
 
-SERVER=localhost # JLigier for StateMachine
-LOGGER=localhost # JLigier for logging
+SERVER=${DAQ_SERVER} # JLigier for StateMachine
+LOGGER=${DAQ_SERVER} # JLigier for logging
 DEBUG=3          # 3 is highest
 TIMEOUT_S=20     # timeout arbitrarily set at 20 seconds
 
@@ -28,11 +27,11 @@ NUMBER_OF_FRAMES=18 # 18 doms
 
 DIR=. # where to write the data
 
-DATAFILTER=localhost # hostname of oDataFilter
-DATAQUEUE=localhost  # hostname of DataQueue
+DATAFILTER=${DAQ_SERVER} # hostname of oDataFilter
+DATAQUEUE=${DAQ_SERVER}  # hostname of DataQueue
 PORT=5556            # port to which the dataqueue will send the frames
 
-DATAWRITER=localhost # hostname of the DataWriter
+DATAWRITER=${DAQ_SERVER} # hostname of the DataWriter
 
 DETECTOR=du1cppm.detx # position of the detector file
 
-- 
GitLab