start transmission as seeder
authorDobrica Pavlinusic <dpavlin@rsync1.maxxo.com>
Mon, 9 Jan 2012 18:12:58 +0000 (19:12 +0100)
committerDobrica Pavlinusic <dpavlin@rsync1.maxxo.com>
Mon, 9 Jan 2012 18:12:58 +0000 (19:12 +0100)
init.d/s1-seeder

index fba650d..7d05dcb 100755 (executable)
@@ -5,7 +5,23 @@ eval export `grep s1 /var/lib/extrausers/group | cut -d: -f4`
 NAME=`basename $0`
 
 if [ "$1" = "start" ] ; then
-       screen -dmS $NAME /srv/cloudstore/torrent/start-seeder.sh
-       screen -ls | grep s1-seeder | cut -d. -f1 | sed 's/^ *//' > /tmp/$NAME.pid
-fi
 
+/usr/bin/transmission-daemon \
+--allowed 127.0.0.1,10.13.37.* \
+--no-watch-dir \
+--incomplete-dir /rsync1/s1/torrent/incomplete/ \
+--download-dir /rsync1/s1/torrent/download/ \
+--logfile /tmp/$NAME.log \
+--dht \
+--lpd \
+--utp \
+--peerport 6503 \
+--encryption-preferred \
+--bind-address-ipv4 $seed_ip \
+--no-portmap \
+--pid-file /tmp/$NAME.pid \
+--config-dir /rsync1/s1/torrent/
+
+elif [ "$1" = "stop" ] ; then
+       kill `cat /tmp/$NAME.pid`
+fi