--- /dev/null
+#!/bin/sh -xe
+
+# name inside torrent must be md5sum to provide distributed upload
+md5=`md5sum $1 | cut -d' ' -f1`
+ln -s $1 $md5
+mktorrent -a http://213.186.16.27:6502/announce --no-date --name=$md5 --output=$1.torrent --verbose $md5
+
+USER=u2003
+IP=10.13.37.101
+RSYNC_PASSWORD=password rsync $1.torrent rsync://$USER@$IP:6501/$USER/
+
+echo "~$USER/$1.torrent" | gearman -h 10.13.37.101 -f rsync1_s1_torrent_download -n
+
+ctorrent $1.torrent