#1 2010-05-25 01:23:41
关于rtorrent的求助
我的机器是asus wl500gp。安装的rtorrent是rtorrent - 0.8.6-1 版,在/opt/bt/下面建有cache、download、torrent三个文件目录。现在运行:“/opt/etc/init.d/S99rtorrent start ” 出现提示性错误:“Starting rtorrent: rtorrenttee: : No such file or directory”,我估计是S99rtorrent文件和rtorrent.conf文件的相关配置不正确。
哪位大侠用的是torrent - 0.8.5或torrent - 0.8.4的,能不能帮助我,给把这两个文件给发一份。谢谢
另附我现在的两个配置文件
離線
#2 2010-05-25 01:32:46
Re: 关于rtorrent的求助
哪位大侠给看看我的配置文件错在那里了?谢谢
S99rtorrent
#!/bin/sh
dirlayout=RTORRENT_ANOTHER
# . /etc/rtorrent.init.conf
user="admin"
# group=`id -ng "$user"`
prefix="/opt"
# the full path to the filename where you store your rtorrent configuration
if [ "${dirlayout}" = "RTORRENT_DEFAULT" ] ; then
config="${prefix}/home/${user}/.rtorrent.rc"
else
config="/opt/etc/rtorrent.conf"
fi
# set of options to run with
if [ "${dirlayout}" = "RTORRENT_DEFAULT" ] ; then
options=""
else
options="-n -o import=${config}"
fi
# default directory for screen, needs to be an absolute path
if [ "${dirlayout}" = "RTORRENT_DEFAULT" ] ; then
base="${prefix}/home/${user}"
else
base="/opt/bt/torrent"
fi
# name of screen session
srnname="rtorrent"
# file to log to (makes for easier debugging if something goes wrong)
#logfile="/opt/var/log/rtorrentInit.log"
#######################
###END CONFIGURATION###
#######################
PATH=/opt/bin:/opt/sbin:/usr/bin:/sbin:/bin:/usr/sbin
DESC="rtorrent"
NAME=rtorrent
DAEMON=$NAME
SCRIPTNAME=/etc/init.d/$NAME
# Do not proceed unless some apps are available.
test -x /opt/bin/screen || ( echo "screen not found." | tee -a "$logfile" >&2 ;
test -x /opt/bin/su -o -x /bin/su || ( echo "su not found." | tee -a "$logfile"
checkcnfg() {
exists=0
for i in `echo "$PATH" | tr ':' '\n'` ; do
if [ -f "$i/$NAME" ] ; then
exists=1
break
fi
done
if [ $exists -eq 0 ] ; then
echo "cannot find rtorrent binary in PATH $PATH" | tee -a "$logf
exit 3
fi
if ! [ -r "${config}" ] ; then
echo "cannot find readable config ${config}. check that it is th
exit 3
fi
session=`getsession "$config"`
if ! [ -d "${session}" ] ; then
echo "cannot find readable session directory ${session} from con
exit 3
fi
}
d_start() {
[ -d "${base}" ] && cd "${base}"
stty stop undef && stty start undef
su -c "screen -ls | grep -sq "\.${srnname}[[:space:]]" " ${user} || su -c "scr
# this works for the screen command, but starting rtorrent below adopts screen
# even if it is not the screen session we started (e.g. running under an undes
#su -c "screen -ls | grep -sq "\.${srnname}[[:space:]]" " ${user} || su -c "sg
su -c "screen -S "${srnname}" -X screen rtorrent ${options} 2>&1 1>/dev/null"
}
d_stop() {
session=`getsession "$config"`
if ! [ -s ${session}/rtorrent.lock ] ; then
return
fi
pid=`cat ${session}/rtorrent.lock | awk -F: '{print($2)}' | sed "s/[^0-9
if ps | grep -sq ${pid}.*rtorrent ; then # make sure the pid doesn't bel
kill -s INT ${pid}
fi
}
getsession() {
session=`awk '/^[[:space:]]*session[[:space:]]*=[[:space:]]*/{print($3)}
echo $session
}
checkcnfg
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
d_stop
echo "."
;;
restart|force-reload)
echo -n "Restarting $DESC: $NAME"
d_stop
sleep 1
d_start
echo "."
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
rtorrent.conf[u]
cgi_port = localhost:5000
min_peers = 0
max_peers = 40
max_uploads = 5
port_range = 51777-51780
use_udp_trackers = yes
safe_sync = yes
dht = auto
dht_port = 6881
peer_exchange = yes
download_rate = 0
upload_rate = 60
check_hash = no
hash_read_ahead = 5
hash_max_tries = 5
hash_interval = 10
directory = /opt/bt/download/
session = /opt/bt/cache/
schedule = watch_directory,5,5,load_start=/opt/bt/torrent/*.torrent
schedule = untied_directory,5,5,stop_untied=
schedule = untied_directory,5,5,close_untied=
schedule = untied_directory,5,5,remove_untied=
schedule = low_diskspace,5,60,close_low_diskspace=50M
encoding_list = UTF-8
離線
#3 2010-05-25 08:58:19
Re: 关于rtorrent的求助
不知您是參考哪一篇文章安裝rtorrent,預設路徑和板上教程不太一樣?
rTorrent + nTorrent 完整攻略:https://digiland.tw/viewtopic.php?id=688
技術問題請於論壇上集眾人之力公開討論,感恩
離線
#4 2010-05-25 13:09:33
Re: 关于rtorrent的求助
Aven 提到:
不知您是參考哪一篇文章安裝rtorrent,預設路徑和板上教程不太一樣?
rTorrent + nTorrent 完整攻略:https://digiland.tw/viewtopic.php?id=688
rtorrent.conf--------此文件中关于路径的配置是以前rtorrent正常时的配置文件,
S99rtorrent---------是现在rtorrent - 0.8.6-1 版自动生成的配置文件。
我今晚还是按照rTorrent + nTorrent 完整攻略:https://digiland.tw/viewtopic.php?id=688 的教程改改rtorrent.conf文件试一试吧。
谢谢Aven你的提醒
现在搞定了:
S99rtorrent--按照论坛改“rTorrent + nTorrent 完整攻略”中的设定
若搜尋到 #!/opt/bin/bash 請改成 #!/bin/sh
若搜尋到 user="p2p" 或 user="root" 改成 user="admin"
若搜尋到 #dirlayout="RTORRENT_DEFAULT" 取消#字號並改成 dirlayout="RTORRENT_ANOTHER"
其他不做更改
rtorrent.conf :不做更改
flashfs save && flashfs commit && flashfs enable && reboot
/opt/etc/init.d/S99rtorrent start
screen -r 即可进入rtorrent
我没有用rtorrent别的客户端,只是这样用。熟悉了还是很方便的,而且可以节约有限的资源。呵呵,个人认为。
谢谢Aven及数位天堂论坛,以及各位网友,这个论坛真的太棒了!!!
最後修改: zchwy (2010-05-27 00:48:15)
離線