ruTorrent and Nginx without sockets

simur612

Member
May 25, 2018
879
0
16
Hi,

Is there a way to install and use ruTorrent with nginx without the sockets but with the php-cgi instead ? Because I already have others services on my server which are using nginx and I don't want to reconfigure all my server.

FYI : I'm on a Debian Squeeze server.
 

simur612

Member
May 25, 2018
879
0
16
My bad I didn't see I was using https instead of http. I will now look for authentification ! Thanks for your fast reply smiley.gif
 

simur612

Member
May 25, 2018
879
0
16
Hi again, I'm experiencing some trouble to launch rtorrent with a daemon script. I've created an user named "rtorrent" and when I launch my script, rtorrent isn't launched apparently :

Code:
#!/bin/sh -e
# Start/Stop rtorrent sous forme de daemon.

NAME=rtorrent-daemon.sh
SCRIPTNAME=/etc/init.d/$NAME
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

case $1 in
start)
echo "Starting rtorrent... "
su -l rtorrent -c "screen -fn -dmS rtd nice -19 rtorrent"
echo "Terminated"
;;
stop)
if [ "$(ps aux | grep -e '.*rtorrent$' -c)" != 0 ]; then
{
echo "Shutting down rtorrent... "
killall -r "^.*rtorrent$"
echo "Terminated"
}
else
{
echo "rtorrent not yet started !"
echo "Terminated"
}
fi
;;
restart)
if [ "$(ps aux | grep -e '.*rtorrent$' -c)" != 0 ]; then
{
echo "Shutting down rtorrent... "
killall -r "^.*rtorrent$"
echo "Starting rtorrent... "
su -l rtorrent -c "screen -fn -dmS rtd nice -19 rtorrent"
echo "Terminated"
}
else
{
echo "rtorrent not yet started !"
echo "Starting rtorrent... "
su -l rtorrent -c "screen -fn -dmS rtd nice -19 rtorrent"
echo "Terminated"
}
fi
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
exit 2
;;
esac

Obviously, ruTorrent can't find rTorrent.

Any guess ?
 

simur612

Member
May 25, 2018
879
0
16
Well I found when changing :

Code:
su -l rtorrent -c "screen -fn -dmS rtd nice -19 rtorrent"

to

Code:
su - rtorrent -c "screen -fn -dmS rtd nice -19 rtorrent"

It's working. But I've got one problem : torrent doesn't start they're in pause mode no matter what I do. The destination download folder belong to the user rtorrent. So what I am missing ?
 

peshua19

Member
May 25, 2018
897
0
16
Check permissions for session directory. Try to stop/start torrent. Open rtorrent console, and check - what rtorrent say to yuo about this problem.
 

simur612

Member
May 25, 2018
879
0
16
I already tried that. But it's happenning only when I import a torrent from a file. If I import a torrent by a link it works perfectly.

It seems the torrent link isn't send from ruTorrent to rTorrent. Any guess ?
 

simur612

Member
May 25, 2018
879
0
16
Ok I found where the problem was. In my .rtorrent.rc I had specified ./downloads for the download's folder. For rTorrent It works well because I execute rTorrent with the user rtorrent and this folder is located in /home/rtorrent/downloads but for ruTorrent it indicates that the downloads folder is in /var/www/rutorrent/php/ and the folder doesn't exist. Plus only my partition /home has enough space to download smiley.gif

So I changed ./downloads to /home/rtorrent/downloads and it works now.

Thank you all smiley.gif