X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=init.d%2Fs1-seeder;h=7f55f093a136d482fec76e734219fb2e8a25762e;hb=HEAD;hp=7d05dcb8f9d7c112db051b2115d9cbe5d2fbc3e4;hpb=a18b2b4bdaaa1af872f3404bdab91ac55b31c888;p=cloudstore.git diff --git a/init.d/s1-seeder b/init.d/s1-seeder index 7d05dcb..7f55f09 100755 --- a/init.d/s1-seeder +++ b/init.d/s1-seeder @@ -1,27 +1,36 @@ #!/bin/sh -eval export `grep s1 /var/lib/extrausers/group | cut -d: -f4` +. /srv/cloudstore/init.d/_start_stop + +eval export `grep $SLICE_GROUP /var/lib/extrausers/group | cut -d: -f4` +dir=`grep $SLICE_GROUP /var/lib/extrausers/group | cut -d: -f2` NAME=`basename $0` if [ "$1" = "start" ] ; then +test -d $dir/torrent/incomplete || mkdir -p $dir/torrent/incomplete +test -d $dir/torrent/download || mkdir -p $dir/torrent/download + /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 \ +--incomplete-dir $dir/torrent/incomplete/ \ +--download-dir $dir/torrent/download/ \ +--logfile $dir/log/$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/ +--config-dir $dir/torrent/ + +#--utp \ elif [ "$1" = "stop" ] ; then kill `cat /tmp/$NAME.pid` +elif [ "$1" = "reload" ] ; then + kill -HUP `cat /tmp/$NAME.pid` fi