test file_size with send to different shard
[cloudstore.git] / client / upload-torrent.sh
1 #!/bin/sh -xe
2
3 # name inside torrent must be md5sum to provide distributed upload
4 md5=`md5sum $1 | cut -d' ' -f1`
5 ln -s $1 $md5
6 mktorrent -a http://213.186.16.27:6502/announce --no-date --name=$md5 --output=$1.torrent --verbose $md5
7
8 USER=u2003
9 IP=10.13.37.101
10 RSYNC_PASSWORD=password rsync $1.torrent rsync://$USER@$IP:6501/$USER/
11
12 echo "~$USER/$1.torrent" | gearman -h 10.13.37.101 -f rsync1_s1_torrent_download -n
13
14 ctorrent $1.torrent