From: Razvan Deaconescu Date: Sun, 21 Nov 2010 19:55:56 +0000 (+0200) Subject: source config file; cleanup leecher data folder X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=ecca2cc1b3f2ff88834ed8cf255b05a591b9eea0;p=utp-swift.git source config file; cleanup leecher data folder --- 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