source config file; cleanup leecher data folder
authorRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Sun, 21 Nov 2010 19:55:56 +0000 (21:55 +0200)
committerRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Sun, 21 Nov 2010 19:55:56 +0000 (21:55 +0200)
local_start_swift_leecher
local_start_swift_seeder
local_start_utp_receiver
local_start_utp_sender

index c307b3e..abf03ae 100755 (executable)
@@ -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
 
index 2e4a668..082a2d3 100755 (executable)
@@ -1,5 +1,8 @@
 #!/bin/bash
 
+# load config
+source ./config
+
 if test $# -ne 1; then
        echo "Usage: $0 local-ip" 1>&2
        exit 1
index 3570efa..407f429 100755 (executable)
@@ -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
index c212650..d8d70ed 100755 (executable)
@@ -1,5 +1,8 @@
 #!/bin/bash
 
+# load config
+source ./config
+
 if test $# -ne 1; then
        echo "Usage: $0 receiver_ip" 1>&2
        exit 1