ControlScripts/clients/transmission: transmission support files were created
[p2p-testing-infrastructure.git] / ControlScripts / clients / transmission / start_transmission_seeder.sh
diff --git a/ControlScripts/clients/transmission/start_transmission_seeder.sh b/ControlScripts/clients/transmission/start_transmission_seeder.sh
new file mode 100755 (executable)
index 0000000..0e81927
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+# 2011, Calin-Andrei Burloiu, calin.burloiu@gmail.com
+#
+# Bash script used to start a transmission instance
+# The script
+#  * changes current working directory to TorrentsAndData
+#  * starts a transmission session
+#  * at the end deletes the downloaded data
+#
+# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder
+#
+
+# 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/
+
+LD_LIBRARY_PATH=$HRK_ABS_PATH/../libtorrent-rasterbar/lib $HRK_ABS_PATH/hrktorrent --nodht --nohashcheck $TORRENT_FILE