# start/stop/detect scripts
#
+# Read scenarion configuration file
+source ${BASE_PATH}/ClientWorkingFolders/TmpLogs/scenario_config
+
start_client()
{
- local client_type=$1
- local torrent_file=$2
-
DEBUG echo "starting client ..."
- case "${client_type}" in
+ case "${CLIENT_TYPE}" in
"hrktorrent_seeder")
- ./start_hrk_seeder.sh ${torrent_file} &
+ ./start_hrk_seeder.sh &
return $!
;;
"hrktorrent_leecher")
- ./start_hrk_leecher.sh ${torrent_file} &
+ ./start_hrk_leecher.sh &
return $!
;;
esac
stop_client()
{
- local client_type=$1
+ local CLIENT_TYPE=$1
DEBUG echo "stopping client ..."
- case "${client_type}" in
+ case "${CLIENT_TYPE}" in
"hrktorrent_seeder")
./stop_hrk.sh
;;
detect_complete_client()
{
- local client_type=$1
- local log_file=$2
+ local log_file=$1
DEBUG echo "stopping client ..."
- case "${client_type}" in
+ case "${CLIENT_TYPE}" in
"hrktorrent_seeder")
./detect_complete_hrk.sh ${log_file}
;;
parse_client_log()
{
- local client_type=$1
- local log_folder=$2
- local log_file=$3
+ local log_folder=$1
+ local log_file=$2
DEBUG echo "stopping client ..."
- case "${client_type}" in
+ case "${CLIENT_TYPE}" in
"hrktorrent_seeder")
./parse_hrk.sh ${log_folder} ${log_file}
;;