transmission support almost ready
[p2p-testing-infrastructure.git] / ControlScripts / clients / transmission / start_transmission_seeder.sh
1 #!/bin/bash
2 #
3 # 2011, Calin-Andrei Burloiu, calin.burloiu@gmail.com
4 #
5 # Bash script used to start a transmission instance
6 # The script
7 #  * changes current working directory to TorrentsAndData
8 #  * starts a transmission session
9 #  * at the end deletes the downloaded data
10 #
11 # If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder
12 #
13
14 # Read the global configuration file
15 # Check if the global configuration file exists
16 if [ ! -e globalconfig ]; then
17         echo "Warning: The global config file globalconfig does not exist."
18 else
19         source globalconfig
20 fi
21
22 # Read the node-specific configuration file (TORRENT_FILE)
23 # Check if the node-specific configuration file exists
24 if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
25         echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
26 else
27         source ../ClientWorkingFolders/TmpLogs/node_config
28 fi
29
30 rm ~/.config/tramsmission/resume/*
31 rm ~/.config/tramsmission/torrents/*
32
33 cd $WORKING_FOLDER_REL_PATH/TorrentsAndData/
34
35 $TRANSMISSION_ABS_PATH/transmission-cli $TORRENT_FILE -w .