From 165e5273c1506399cb293d4b408df28e9573fb37 Mon Sep 17 00:00:00 2001 From: Razvan Deaconescu Date: Sun, 19 Sep 2010 21:14:27 +0300 Subject: [PATCH] ControlScripts: add working version of next-share start scripts --- .../next-share/start_nextshare_leecher.sh | 18 ++++++++++-------- .../next-share/start_nextshare_seeder.sh | 18 +++++++++++------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/ControlScripts/clients/next-share/start_nextshare_leecher.sh b/ControlScripts/clients/next-share/start_nextshare_leecher.sh index 36bcd05..bf44d33 100755 --- a/ControlScripts/clients/next-share/start_nextshare_leecher.sh +++ b/ControlScripts/clients/next-share/start_nextshare_leecher.sh @@ -2,13 +2,15 @@ # # Copyright: George Milescu 2010 - george.milescu@gmail.com # -# Bash script used to start a regular (non doe, non proxy) instance of tribler cmd-line +# Bash script used to start a regular instance of next-share cmd-line # The script -# * changes current working directory to proxyservice-m32 -# * starts a tribler cmd-line instance with the supplied .torrent file. The .torrent file must be located in the TorrentsAndData folder +# * starts a next-share cmd-line instance with the supplied .torrent file. +# The .torrent file must be located in the TorrentsAndData folder # * at the end deletes the downloaded data # -# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder and use one argument: the torrent file name that will be loaded from the TorrentsAndData folder +# If you run this script manually, you must run it from the +# P2P-Testing-Infrastructure/ControlScripts folder and use one argument: the +# torrent file name that will be loaded from the TorrentsAndData folder # # Read the global configuration file @@ -27,14 +29,14 @@ else source ../ClientWorkingFolders/TmpLogs/node_config fi -if [ " $TORRENT_FILE" = " " ]; then +if [ " $TORRENT_FILE" = " " ]; then TORRENT_FILE=$1 fi -export PYTHONPATH=$PYTHONPATH:. +cd $NEXTSHARE_ABS_PATH -cd $TRIBLER_REL_PATH +export PYTHONPATH=$PYTHONPATH:. -python2.6 Tribler/Tools/proxy-cmdline.py --proxymode off --test-mode off --port 25124 --state-dir $WORKING_FOLDER_REL_PATH/Regular/statedir --output-dir $WORKING_FOLDER_REL_PATH/Regular/ $WORKING_FOLDER_REL_PATH/TorrentsAndData/$TORRENT_FILE +python2.5 BaseLib/Tools/cmdlinedl.py --output-dir $WORKING_FOLDER_REL_PATH/Regular/ $WORKING_FOLDER_REL_PATH/TorrentsAndData/$TORRENT_FILE rm -rf $WORKING_FOLDER_REL_PATH/Regular/* diff --git a/ControlScripts/clients/next-share/start_nextshare_seeder.sh b/ControlScripts/clients/next-share/start_nextshare_seeder.sh index 3d4d097..592338f 100755 --- a/ControlScripts/clients/next-share/start_nextshare_seeder.sh +++ b/ControlScripts/clients/next-share/start_nextshare_seeder.sh @@ -4,10 +4,12 @@ # # Bash script used to start a seeder instance for the testing topology # The script -# * changes current working directory to proxyservice-m32 -# * starts a command line BT client seeding the supplied .torrent file. The .torrent file must be located in the TorrentsAndData folder +# * starts a command line BT client seeding the supplied .torrent file. +# The .torrent file must be located in the TorrentsAndData folder # -# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder and use one argument: the torrent file name that will be loaded from the TorrentsAndData folder +# If you run this script manually, you must run it from the +# P2P-Testing-Infrastructure/ControlScripts folder and use one argument: the +# torrent file name that will be loaded from the TorrentsAndData folder # # Read the global configuration file @@ -26,14 +28,16 @@ else source ../ClientWorkingFolders/TmpLogs/node_config fi -if [ " $TORRENT_FILE" = " " ]; then +if [ " $TORRENT_FILE" = " " ]; then TORRENT_FILE=$1 fi -export PYTHONPATH=$PYTHONPATH:. +cd $NEXTSHARE_ABS_PATH -cd $TRIBLER_REL_PATH +export PYTHONPATH=$PYTHONPATH:. -python2.6 Tribler/Tools/proxy-cmdline.py --port 25125 --state-dir $WORKING_FOLDER_REL_PATH/Seeder/statedir --output-dir $WORKING_FOLDER_REL_PATH/TorrentsAndData/ $WORKING_FOLDER_REL_PATH/TorrentsAndData/$TORRENT_FILE +set -x +python2.5 BaseLib/Tools/cmdlinedl.py --output-dir $WORKING_FOLDER_REL_PATH/TorrentsAndData/ $WORKING_FOLDER_REL_PATH/TorrentsAndData/$TORRENT_FILE +set +x rm -rf $WORKING_FOLDER_REL_PATH/Seeder/* -- 2.20.1