4 echo "Usage: $0 host1 port1 host2 port2 timeout id" 1>&2
16 ssh -n -f -p $port1 -l root $host1 "/home/p2p/eurocon/local_clean"
17 ssh -n -f -p $port2 -l root $host2 "/home/p2p/eurocon/local_clean"
19 ip=$(ssh -n -f -p $port1 -l root $host1 "/home/p2p/eurocon/local_get_ip")
22 ssh -n -f -p $port1 -l p2p $host1 "/home/p2p/eurocon/local_create_torrent $ip"
23 ssh -n -f -p $port2 -l p2p $host2 "/home/p2p/eurocon/local_create_torrent $ip"
26 ssh -n -f -p $port1 -l p2p $host1 "/home/p2p/eurocon/local_run_tracker"
31 ssh -n -f -p $port1 -l p2p $host1 "/home/p2p/eurocon/local_start_seeder"
34 ssh -n -f -p $port2 -l p2p $host2 "/home/p2p/eurocon/local_start_leecher"
39 # put leecher interface down
40 ssh -n -f -p $port2 -l root $host2 "/home/p2p/eurocon/local_ifdown"
46 ssh -n -f -p $port2 -l root $host2 "/home/p2p/eurocon/local_ifup"
51 ssh -n -f -p $port1 -l root $host1 "/home/p2p/eurocon/local_clean"
52 ssh -n -f -p $port2 -l root $host2 "/home/p2p/eurocon/local_clean"
55 rsync -avz -e "ssh -p $port1" p2p@$host1:/home/p2p/eurocon/hrk.log ../eurocon-log/$host1-$port1-$id-$timeout-seeder.log
56 rsync -avz -e "ssh -p $port2" p2p@$host2:/home/p2p/eurocon/hrk.log ../eurocon-log/$host2-$port2-$id-$timeout-leecher.log
59 ssh -n -f -p $port1 -l p2p $host1 "mv /home/p2p/eurocon/hrk.log hrk-$(date +%s).log"
60 ssh -n -f -p $port2 -l p2p $host2 "mv /home/p2p/eurocon/hrk.log hrk-$(date +%s).log"