From cce1e3e1d578fe8b8804c84b000c710e860a5eb9 Mon Sep 17 00:00:00 2001 From: Razvan Deaconescu Date: Tue, 3 Aug 2010 17:34:47 +0300 Subject: [PATCH] ConfilFiles: add client_script_mappings shell config file --- ConfigFiles/client_script_mappings | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ConfigFiles/client_script_mappings diff --git a/ConfigFiles/client_script_mappings b/ConfigFiles/client_script_mappings new file mode 100644 index 0000000..e86992a --- /dev/null +++ b/ConfigFiles/client_script_mappings @@ -0,0 +1,39 @@ +#!/bin/bash + +# +# Configuration file for mapping client (string) identifiers to +# start/stop/detect scripts +# + +start_client() +{ + local client_type=$1 + local client_pid=$1 + + DEBUG echo "starting client ..." + case "${client_type}" in + "hrktorrent_seeder") + ./start_hrk_seeder.sh ${torrent_file} & + return $(pgrep -P $!) + ;; + "hrktorrent_leecher") + ./start_hrk_leecher.sh ${torrent_file} & + return $(pgrep -P $!) + ;; + esac +} + +stop_client() +{ + local client_type=$1 + + DEBUG echo "stopping client ..." + case "${client_type}" in + "hrktorrent_seeder") + ./stop_hrk.sh + ;; + "hrktorrent_leecher") + ./stop_hrk.sh + ;; + esac +} -- 2.20.1