#!/bin/sh . /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 $dir/torrent/incomplete/ \ --download-dir $dir/torrent/download/ \ --logfile $dir/log/$NAME.log \ --dht \ --lpd \ --peerport 6503 \ --encryption-preferred \ --bind-address-ipv4 $seed_ip \ --no-portmap \ --pid-file /tmp/$NAME.pid \ --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