# * manages when client completes
# use _DEBUG="off" to turn off debug printing
-_DEBUG="off"
-
-DEBUG()
-{
- test ${_DEBUG} = "on" && $@
-}
+_DEBUG="on"
# Read the global configuration variables
source ../ConfigFiles/globalconfig
# Read scenarion configuration file
-source ${BASE_PATH}/ClientWorkingFolders/TmpLogs/scenario_config
+source ../ClientWorkingFolders/TmpLogs/scenario_config
# Read client mappings configuration file
source ../ConfigFiles/client_script_mappings
local tmp_array=($(echo "$PERIODS" | sed 's/[,()]/ /g'))
start_time=${tmp_array[0]}
local len=${#tmp_array[@]}
+ DEBUG echo "PERIODS: $PERIODS"
stop_time=${tmp_array[$(($len-1))]}
to_sleep=${start_time}
sleep ${to_sleep}
-start_client
+DEBUG echo "CLIENT_TYPE is ${CLIENT_TYPE}"
+start_client ${CLIENT_TYPE}
background_pid=$!
DEBUG echo "background_pid is ${background_pid}"
old_time=${start_time}
to_sleep=$((${stop_time} - ${old_time}))
sleep ${to_sleep}
-stop_client
+stop_client ${CLIENT_TYPE}