From: Razvan Deaconescu Date: Tue, 3 Aug 2010 14:34:23 +0000 (+0300) Subject: ControlScripts: move start/stop functions to a script in ConfigFiles X-Git-Tag: classic-scenario-config~6 X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=a4ffc0a46cbe4986ce860584a634aadf7d385ebc;p=p2p-testing-infrastructure.git ControlScripts: move start/stop functions to a script in ConfigFiles --- diff --git a/ControlScripts/client_schedule.sh b/ControlScripts/client_schedule.sh index 733fe7b..fc40be0 100755 --- a/ControlScripts/client_schedule.sh +++ b/ControlScripts/client_schedule.sh @@ -7,6 +7,7 @@ # * starts/stops a client # * manages when client completes +# use _DEBUG="off" to turn off debug printing _DEBUG="on" DEBUG() @@ -22,6 +23,9 @@ fi # Read the global configuration variables source ../ConfigFiles/globalconfig.txt +# Read client mappings configuration file +source ../ConfigFiles/client_script_mappings + client_type=$1 torrent_file=$2 @@ -47,24 +51,16 @@ parse_periods() done } -start_client() -{ - DEBUG echo "starting client ..." -} - -stop_client() -{ - DEBUG echo "stopping client ..." -} - suspend_client() { DEBUG echo "suspending client ..." + kill -STOP ${client_pid} } resume_client() { DEBUG echo "resuming client ..." + kill -CONT ${client_pid} } parse_periods