From ecca2cc1b3f2ff88834ed8cf255b05a591b9eea0 Mon Sep 17 00:00:00 2001 From: Razvan Deaconescu Date: Sun, 21 Nov 2010 21:55:56 +0200 Subject: [PATCH] source config file; cleanup leecher data folder --- local_start_swift_leecher | 6 ++++++ local_start_swift_seeder | 3 +++ local_start_utp_receiver | 6 ++++++ local_start_utp_sender | 3 +++ 4 files changed, 18 insertions(+) diff --git a/local_start_swift_leecher b/local_start_swift_leecher index c307b3e..abf03ae 100755 --- a/local_start_swift_leecher +++ b/local_start_swift_leecher @@ -1,5 +1,8 @@ #!/bin/bash +# load config +source ./config + if test $# -ne 1; then echo "Usage: $0 seeder-ip" 1>&2 exit 1 @@ -13,6 +16,9 @@ cleanup() kill -TERM $hook_pid > /dev/null 2>&1 } +# remove receiver data, if any +rm -fr $LEECHER_DIR/* + # wait for seeder startup sleep 30 diff --git a/local_start_swift_seeder b/local_start_swift_seeder index 2e4a668..082a2d3 100755 --- a/local_start_swift_seeder +++ b/local_start_swift_seeder @@ -1,5 +1,8 @@ #!/bin/bash +# load config +source ./config + if test $# -ne 1; then echo "Usage: $0 local-ip" 1>&2 exit 1 diff --git a/local_start_utp_receiver b/local_start_utp_receiver index 3570efa..407f429 100755 --- a/local_start_utp_receiver +++ b/local_start_utp_receiver @@ -1,11 +1,17 @@ #!/bin/bash +# load config +source ./config + cleanup() { kill -TERM $client_pid > /dev/null 2>&1 kill -TERM $hook_pid > /dev/null 2>&1 } +# remove receiver data, if any +rm -fr $LEECHER_DIR/* + > $UTP_RECEIVER_OUT_LOG > $UTP_RECEIVER_LOG_FILE > $UTP_RECEIVER_MONITOR_LOG diff --git a/local_start_utp_sender b/local_start_utp_sender index c212650..d8d70ed 100755 --- a/local_start_utp_sender +++ b/local_start_utp_sender @@ -1,5 +1,8 @@ #!/bin/bash +# load config +source ./config + if test $# -ne 1; then echo "Usage: $0 receiver_ip" 1>&2 exit 1 -- 2.20.1