Merge branch 'attr'
[cloudstore.git] / torrent / start-seeder.sh
index 5982061..f1bdb62 100755 (executable)
@@ -1,23 +1,24 @@
 #!/bin/sh -xe
 
-cd /rsync1/s1
+cd /rsync1/s1/torrent
 
 eval export `grep s1 /var/lib/extrausers/group | cut -d: -f4`
 
-test -d torrent/session || mkdir torrent/session
+test -d session || mkdir session
 
-test -S torrent/socket && rm -v torrent/socket # fix rtorrent startup problem
+test -S socket && rm -vf socket # fix rtorrent startup problem
 
-rtorrent -O directory=md5 \
--O session=torrent/session \
--O schedule=watch_directory,5,5,load_start=torrent/seed/*.torrent \
+rtorrent -O directory=download/ \
+-O session=session \
+-O schedule=watch_directory,5,5,load_start=seed/*.torrent \
 -O schedule=tied_directory,5,5,start_tied= \
 -O schedule=untied_directory,5,5,close_untied= \
--O scgi_local=torrent/socket \
+-O scgi_local=socket \
 -O bind=$seed_ip -O port_range=$seed_port_range \
 -O dht=auto -O dht_port=$seed_dht_port \
 -O peer_exchange=yes \
--O download_rate=$seed_download -O upload_rate=$seed_upload
+-O download_rate=$seed_download -O upload_rate=$seed_upload \
+-O system.method.set_key=event.download.finished,notify_me,execute=/srv/cloudstore/torrent/rtorrent-finish-download.sh,$d.get_name= \
 
 # last line for debug, comment out but leave enty line before this comment!