转载于群晖官方英文论坛 以下代码请复制到记事本另存为.sh文件(rt.sh),放到NAS目录(/volume1/nas/rt.sh),telnet进入,请用root登录,找到你的脚本文件(cd /volume1/nas),运行脚本文件(sh rt.sh),括号内为示例。 重要:脚本运行错误请检查: 1、是否root用户登录; 2、chmod +x rt.sh 3、chown root.root rt.sh 4、检查你的脚本文件,用vi rt.sh查看,是否每行代码最后有^M字样,如果有,按键盘i键,逐一删除后按esc键退出编辑,然后按shift+:,输入wq保存退出。 5、rm -r /volume1/@tmp 6、再次运行脚本 请自己删除自动换行:代码11行 还要出错,对不起,不要问我了,我也不知道了。 安装成功后rtorrent地址 http://你的IP:5050/rutorrent 代码如下: #!/bin/sh LIGHTTPDCONF=/opt/etc/lighttpd/lighttpd.conf RTORRENTCONF=/opt/etc/rtorrent.conf mkdir -p /volume1/@tmp cd /volume1/@tmp/ # IPKG echo -e "\033[1mInstalling IPKG\033[0m" wget http://ipkg.nslu2-linux.org/feed ... strap_1.2-7_arm.xsh sh syno-mvkw-bootstrap_1.2-7_arm.xsh & sleep 20 ipkg update # Lighttpd echo -e "\033[1mInstalling Lighttpd\033[0m" ipkg install lighttpd php-fcgi echo 'server.event-handler = "poll"' >> ${LIGHTTPDCONF} echo 'server.modules += ("mod_auth","mod_cgi","mod_scgi")' >> ${LIGHTTPDCONF} echo ' scgi.server = ("/RPC2" => ("127.0.0.1" => ("host" => "127.0.0.1", "port" => 5050, "check-local" => "disable") ) ) ' >> ${LIGHTTPDCONF} # rtorrent echo -e "\033[1mInstalling RTorrent\033[0m" ipkg install rtorrent screen ipkg remove xmlrpc-c mkdir -p /opt/share/torrent/session/ echo 'scgi_port = 127.0.0.1:5050' >> ${RTORRENTCONF} echo '#!/bin/sh NAME=rtorrent CONFIG=/opt/etc/rtorrent.conf LOGFILE=/opt/var/log/rtorrentInit.log TORRENTFILE=/opt/bin/rtorrent OPTIONS="-n -o import=$CONFIG" getsession() { session=`sed -n "/session\s*=/s/^\s*session\s*=\s*//p" $CONFIG` echo $session } case "$1" in start) screen -list|grep -sq $NAME && exit 0 session=`getsession` [ -e $session/rtorrent.lock ] && rm -rf $session/rtorrent.lock /opt/bin/screen -dmS $NAME $TORRENTFILE $OPTIONS 2>$LOGFILE ;; stop) session=`getsession` ! [ -e $session/rtorrent.lock ] && exit 0 pid=`sed "s/[^0-9]//g" $session/rtorrent.lock` ps|grep -v grep|grep -sq $pid.*rtorrent && kill $pid ;; restart) $0 stop sleep 2 $0 start ;; status) screen -list|grep -s $NAME ;; *) echo $"Usage: \$0 {start|stop|status|restart}" exit 1 esac exit 0 ' > /opt/etc/init.d/S99rtorrent # xmlrpc-c echo -e "\033[1mInstalling xmlrpc-c\033[0m" ipkg install gcc binutils optware-devel libcurl-dev svn co http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/stable xmlrpc-c cd xmlrpc-c ./configure --prefix=/opt make ARCH=arm make install # ruTorrent 3.0 echo -e "\033[1mInstalling ruTorrent\033[0m" cd /opt/share/www svn co http://rutorrent.googlecode.com/svn/trunk/rutorrent/ cd rutorrent rm -r plugins svn co http://rutorrent.googlecode.com/svn/trunk/plugins/ cd plugins rm -r darkpal rpc cd .. sed -i 's/scgi_port\s*=\s*5000/scgi_port = 5050/' conf/config.php echo -e "\033[1mAutoinstall complete\033[0m" reboot |
|Archiver|手机版|小黑屋|第一纳斯网
( 粤ICP备19046372号 )
GMT+8, 2024-11-23 13:16
Powered by Discuz! X3.5
© 2001-2024 Discuz! Team.