|
https://www.right.com.cn/forum/v ... CE%CE%F1&page=1
参考的这篇文章
我是用RTWI WEB管理界面,通过WEB上传种子,无法在/opt/share/data/Downloads/torrent里查看到种子.开始下载后也无法查看到.
手动执行/opt/etc/init.d/mvtorrent后,下载任务还是全部运行.
请高手指点,谢谢
我的配置:
root@DD-WRT:/jffs/opt/bin# more /opt/etc/init.d/mvtorrent
#!/bin/sh
fs=4
source="/opt/share/data/Downloads"
target="/opt/share/data/Downloads/torrent"
session="/opt/share/data/Downloads/.session"
del="auto"
num=`ls ${target} | grep -c started`
if [ $num -lt $fs ] ; then
cd ${source}
#ls | sed 's/^.*/mv "&" \`echo & \| sed "s\/ \/\/g"\`/g' | sh >/dev/null 2>&1
find . -name "*.torrent" | sed 's/^.*/mv "&" \`echo & \| sed "s\/ \/\/g"\`/g' | sh >/dev/null 2>&1
for file in ${source}/*.torrent
do
if [ $file = "${source}/*.torrent" ] ; then
break
fi
mv "$file" ${target}
num=$(($num+1))
if [ $num -eq $fs ] ; then
break
fi
done
fi
if [ $del = "auto" ] ; then
for file in ${target}/*.finished
do
if [ $file = "${target}/*.finished" ] ; then
break
fi
fname=`basename $file .finished`
rm ${target}/${fname}*
done
num=`ls ${target} | grep -c torrent`
if [ $num -eq 0 ] ; then
num=`ls ${session} | grep -c torrent`
if [ $num -gt 2 ] ; then
rm ${session}/*.torrent
fi
fi
root@DD-WRT:/jffs/opt/bin# more /opt/etc/rtorrent.conf
min_peers = 50
max_peers = 250
max_uploads = 15
download_rate = 0
upload_rate = 3
directory = /opt/share/data/Downloads
session = /opt/share/data/Downloads/.session
schedule = watch_directory,5,5,load_start=/opt/share/data/Downloads/torrent/*.torrent
use_udp_trackers = yes
encryption = allow_incoming,enable_retry,prefer_plaintext
encoding_list = UTF-8
umask = 0000
dht = on
dht_port = 6881
check_hash = no
port_range = 51777-51777
peer_exchange = yes
scgi_port = :5000
on_start = link1,"create_link=tied,,.started"
#on_stop = link1,"delete_link=tied,,.started"
on_finished = link1,"create_link=tied,,.finished"
#on_erase = link1,"delete_link=tied,,.finished"
schedule = ratio,30,60,"stop_on_ratio=3" |
|