diff --git a/patch-control.sh b/patch-control.sh index ac303c2c20502b5014e5f16952728c101b5edbab..de337dd4ee7baa7510b43eaa2227cbc988619c05 100755 --- a/patch-control.sh +++ b/patch-control.sh @@ -210,9 +210,11 @@ ssh ${DAQ_USER}@${DAQ_SERVER} "[ -e ${ROOT_FILE} ]" && { let "run_duration_seconds = ${run_duration} * 60" +declare -a PROCS + daq_log_file=~/.km3_private/daq_`printf "%08d" ${run_number}`.log JGetMessage -H ${DAQ_SERVER} -T MSG -d 3 >${daq_log_file} & -PROCS=(${PROCS[*]} $!) +PROCS+=($!) # Copy selected run setup file, changing the run number cat ${rs_file} | sed -e "s/RUNNUMBER/${run_number}/" >${DM_DATA_DIR}/dm.detectorfile @@ -230,22 +232,22 @@ log "Launching the DAQ with the following command line: daq.sh ${run_number} ${r daq_driver_log_file=~/.km3_private/daq_driver_`printf "%08d" ${run_number}`.log daq.sh ${run_number} ${run_start_time} ${run_duration_seconds} ${DAQ_SERVER} ${DAQ_USER} ${duty_cycle} >${daq_driver_log_file} & DAQ_PROC_ID=$! -PROCS=(${PROCS[*]} ${DAQ_PROC_ID}) +PROCS+=(${DAQ_PROC_ID}) # Launch the DM dm_driver ${run_duration_seconds} | mono ${DM_EXE_DIR}/DetectorControl.exe --control --reset --jollytoken jollyroger & -PROCS=(${PROCS[*]} $!) +PROCS+=($!) # Put notification mark in the system tray zenity --notification --text="Run ${run_number} is on going." & -PROCS=(${PROCS[*]} $!) +PROCS+=($!) # Point the browser to the correct address, if required zenity --question \ --text="Would you like to open the DetectorManager GUI?" \ --title="Question (at $(date))" \ --cancel-label="No, thanks" && firefox http://localhost:8102/gui/main.htm & -PROCS=(${PROCS[*]} $!) +PROCS+=($!) # Wait the end of the run end_run_time=`nowUTC`