display and/or create md5sum in user.md5 xattr
[cloudstore.git] / init.d / s1-seeder
1 #!/bin/sh
2
3 . /srv/cloudstore/init.d/_start_stop
4
5 eval export `grep $SLICE_GROUP /var/lib/extrausers/group | cut -d: -f4`
6 dir=`grep $SLICE_GROUP /var/lib/extrausers/group | cut -d: -f2`
7
8 NAME=`basename $0`
9
10 if [ "$1" = "start" ] ; then
11
12 test -d $dir/torrent/incomplete || mkdir -p $dir/torrent/incomplete
13 test -d $dir/torrent/download   || mkdir -p $dir/torrent/download
14
15 /usr/bin/transmission-daemon \
16 --allowed 127.0.0.1,10.13.37.* \
17 --no-watch-dir \
18 --incomplete-dir $dir/torrent/incomplete/ \
19 --download-dir $dir/torrent/download/ \
20 --logfile $dir/log/$NAME.log \
21 --dht \
22 --lpd \
23 --peerport 6503 \
24 --encryption-preferred \
25 --bind-address-ipv4 $seed_ip \
26 --no-portmap \
27 --pid-file /tmp/$NAME.pid \
28 --config-dir $dir/torrent/
29
30 #--utp \
31
32 elif [ "$1" = "stop" ] ; then
33         kill `cat /tmp/$NAME.pid`
34 elif [ "$1" = "reload" ] ; then
35         kill -HUP `cat /tmp/$NAME.pid`
36 fi