--- /dev/null
+#!/bin/bash
+#
+# 2010 Razvan Deaconescu, razvan.deaconescu@cs.pub.ro
+#
+# Bash script used to start a hrktorrent instance
+# The script
+# * changes current working directory to Regular
+# * starts a hrktorrent session - use LD_LIBRARY_PATH to point to
+# libtorrent-rasterbar location
+# * at the end deletes the downloaded data
+#
+# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder
+#
+
+if test $# -ne 2; then
+ echo "Usage: $0 download-limit(kb/s) upload-limit(kb/s)" 1>&2
+ exit 1
+fi
+
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e globalconfig ]; then
+ echo "Warning: The global config file globalconfig does not exist."
+else
+ source globalconfig
+fi
+
+# Read the node-specific configuration file (TORRENT_FILE)
+# Check if the node-specific configuration file exists
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../ClientWorkingFolders/TmpLogs/node_config
+fi
+
+cd $WORKING_FOLDER_REL_PATH/Regular/
+
+KB_DOWN_LIMIT=$1
+KB_UP_LIMIT=$2
+
+LD_LIBRARY_PATH=$HRK_ABS_PATH/../libtorrent-rasterbar/lib $HRK_ABS_PATH/hrktorrent --maxdown${KB_DOWN_LIMIT} --maxup${KB_UP_LIMIT} ../TorrentsAndData/$TORRENT_FILE
+
+rm -rf *
--- /dev/null
+#!/bin/bash
+#
+# 2010 Razvan Deaconescu, razvan.deaconescu@cs.pub.ro
+#
+# Bash script used to start a hrktorrent instance
+# The script
+# * changes current working directory to TorrentsAndData
+# * starts a hrktorrent session - use LD_LIBRARY_PATH to point to
+# libtorrent-rasterbar location
+# * at the end deletes the downloaded data
+#
+# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder
+#
+
+if test $# -ne 2; then
+ echo "Usage: $0 download-limit(kb/s) upload-limit(kb/s)" 1>&2
+ exit 1
+fi
+
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e globalconfig ]; then
+ echo "Warning: The global config file globalconfig does not exist."
+else
+ source globalconfig
+fi
+
+# Read the node-specific configuration file (TORRENT_FILE)
+# Check if the node-specific configuration file exists
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../ClientWorkingFolders/TmpLogs/node_config
+fi
+
+cd $WORKING_FOLDER_REL_PATH/TorrentsAndData/
+
+KB_DOWN_LIMIT=$1
+KB_UP_LIMIT=$2
+
+$LD_LIBRARY_PATH=$HRK_ABS_PATH/../libtorrent-rasterbar/lib $HRK_ABS_PATH/hrktorren --maxdown${KB_DOWN_LIMIT} --maxup${KB_UP_LIMIT} $TORRENT_FILE