From a4ffc0a46cbe4986ce860584a634aadf7d385ebc Mon Sep 17 00:00:00 2001 From: Razvan Deaconescu Date: Tue, 3 Aug 2010 17:34:23 +0300 Subject: [PATCH] ControlScripts: move start/stop functions to a script in ConfigFiles --- ControlScripts/client_schedule.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) 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 -- 2.20.1