3 # Copyright: George Milescu 2010 - george.milescu@gmail.com
5 # Bash script used to start a proxy instance of tribler for the testing topology
7 # * changes current working directory to proxyservice-m32
8 # * starts a tribler cmd-line instance with no target .torrent
9 # * at the end deletes the state directory
12 # * proxy number [1-4]
14 # If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder and use one argument: the the proxy number
17 if [ ! $# -eq 1 ]; then
18 echo "usage: $0 proxy-no"
22 # Read the global configuration file
23 # Check if the global configuration file exists
24 if [ ! -e globalconfig ]; then
25 echo "Warning: The global config file globalconfig does not exist."
30 # Read the node-specific configuration file
31 # Check if the node-specific configuration file exists
32 if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
33 echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
35 source ../ClientWorkingFolders/TmpLogs/node_config
41 export PYTHONPATH=$PYTHONPATH:.
45 python2.6 Tribler/Tools/proxy-cmdline.py --proxymode off --proxyservice on --port 25123 --test-mode helper --state-dir $WORKING_FOLDER_REL_PATH/Proxy$PROXY_NO/statedir --no-download
47 rm -rf $WORKING_FOLDER_REL_PATH/Proxy$PROXY_NO/*