Autodl-irssi
This article will show you how to install the Autodl-irssi scripts and plugin for ruTorrent, as well as troubleshoot common issues. Using this you'll be able to connect to a tracker's announce channel and add data that way, automatically.
You'll need to execute some commands via SSH to use this software. There is a separate guide on how to connect to your slot via SSH. Commands are kept as simple as possible and in most cases will simply need to be copied and pasted into the terminal window (then executed by pressing the Enter key).
Table of contents
Installation - bash script
You can copy and paste the following to run an installation script for autodl irssi and its ruTorrent plugin:
wget -qO ~/install.autodl.sh https://bitbucket.org/feralio/wiki/raw/HEAD/src/wiki/software/autodl/autodl.sh && bash ~/install.autodl.sh
Installation - manual
Install Autodl-irssi by logging in via SSH, then copying and pasting the following:
kill "$(pgrep -fu "$(whoami)" "autodl")" cp -f ~/.autodl/autodl.cfg ~/.autodl/autodl.cfg.bak rm -rf ~/.irssi/scripts/AutodlIrssi ~/.irssi/scripts/autorun/autodl-irssi.pl rm -rf ~/www/$(whoami).$(hostname -f)/public_html/rutorrent/plugins/autodl-irssi mkdir -p ~/.irssi/scripts/autorun ~/.autodl echo -e "[options]\ngui-server-port = 0\ngui-server-password = pass" > ~/.autodl/autodl.cfg wget -qO ~/autodl-irssi.zip $(curl -s https://api.github.com/repos/autodl-community/autodl-irssi/releases/latest | grep 'browser_' | cut -d\" -f4) unzip -qo ~/autodl-irssi.zip -d ~/.irssi/scripts/ cp -f ~/.irssi/scripts/autodl-irssi.pl ~/.irssi/scripts/autorun/ rm -f autodl-irssi.zip .irssi/scripts/{README*,autodl-irssi.pl,CONTRIBUTING.md} wget -qO ~/autodl-rutorrent.zip https://github.com/autodl-community/autodl-rutorrent/archive/master.zip unzip -qo ~/autodl-rutorrent.zip mv ~/autodl-rutorrent-master/_conf.php ~/autodl-rutorrent-master/conf.php pushd autodl-rutorrent-master curl -L https://github.com/autodl-community/autodl-rutorrent/pull/58.patch | patch -p1 popd mv ~/autodl-rutorrent-master ~/www/$(whoami).$(hostname -f)/public_html/rutorrent/plugins/autodl-irssi rm ~/autodl-rutorrent.zip
Configuring before starting autodl-irssi
Autodl-irssi and its plugin assume a local IP of 127.0.0.1 rather than the 10.0.0.1 that Feral uses. These commands make the necessary changes - please execute them whilst autodl-irssi is not running (see the next section for checking if it's running and how to kill and start it up):
sed -i "s|use constant LISTEN_ADDRESS => '127.0.0.1';|use constant LISTEN_ADDRESS => '10.0.0.1';|g" ~/.irssi/scripts/AutodlIrssi/GuiServer.pm sed -i 's|$rtAddress = "127.0.0.1$rtAddress"|$rtAddress = "10.0.0.1$rtAddress"|g' ~/.irssi/scripts/AutodlIrssi/MatchedRelease.pm sed -i 's|my $scgi = new AutodlIrssi::Scgi($rtAddress, {REMOTE_ADDR => "127.0.0.1"});|my $scgi = new AutodlIrssi::Scgi($rtAddress, {REMOTE_ADDR => "10.0.0.1"});|g' ~/.irssi/scripts/AutodlIrssi/MatchedRelease.pm sed -i 's|if (!@socket_connect($socket, "127.0.0.1", $autodlPort))|if (!@socket_connect($socket, "10.0.0.1", $autodlPort))|g' ~/www/"$(whoami)"."$(hostname -f)"/public_html/rutorrent/plugins/autodl-irssi/getConf.php
To be able to manage autodl-irssi through ruTorrent we need to get them communicating with each other by editing their config files. Nano is a good choice to do this since it will avoid possible line ending issues when using other tools.
Edit the autodl-irssi config file with Nano by executing this command:
nano ~/.autodl/autodl.cfg
The file will look like this:
[options]
gui-server-port = 0
gui-server-password = pass
Change the port to something between 10001 and 49999 and change pass to a password of your choice.
Once you're done hold ctrl + x to save. Press y to confirm.
Using nano again, amend the ruTorrent plugin's config file:
nano ~/www/$(whoami).$(hostname -f)/public_html/rutorrent/plugins/autodl-irssi/conf.php
Change $autodlPort and $autodlPassword so they match what you selected in autodl.cfg.
Starting, stopping and restarting
This section covers the Autodl-irssi process - starting it, stopping it and restarting it. It also covers checking if the process is running, in case that becomes necessary.
You can start Autodl-irssi with the following:
screen -dmS autodl irssi
If you need to check that it's running, you can run the command below. If the process is running a list of relevant process ID numbers will be listed. If nothing is listed, the process is not running.
pgrep -fu "$(whoami)" "irssi"
The Autodl-irssi process is stopped by executing:
pkill -fu "$(whoami)" 'irssi'
If Autodl-irssi needs to be restarted, copy and paste this command:
pkill -fu "$(whoami)" 'irssi' && screen -dmS autodl irssi
Please note that if you want to stop the process for Autodl-irssi, it's best to check it afterwards to make sure it has stopped. If the process has crashed and will not stop when requested, you can kill it with:
pkill -9 -fu "$(whoami)" 'irssi'
Automatically restarting autodl-irssi if it is not running
Cron jobs can be used to check if Autodl-irssi is running and start it up if it is not. There is a separate page on configuring cron jobs.
Troubleshooting
If you experience issues or crashes using Autodl-irssi the first thing to try and do is restart the software using the command listed in the section above, Starting, stopping and restarting.
- I get Error: Could not connect: (111) Connection refused" in ruTorrent.
- You can run the bash script at the top of this guide - select option number 3. If you prefer to look at this manually, see the questions below.
-
- Is autodl-irssi running? Check using the check command in the Starting, stopping and restarting section. Start it up if not.
- If running, please try re-running the fix commands from the "Configuring before starting..." section. Refresh ruTorrent to see if it has helped.
- If it hasn't helped, double check the port and passwords in autodl.cfg and conf.php for the plugin match.
Uninstallation
kill -9 "$(pgrep -fu "$(whoami)" "autodl")" rm -rf ~/.autodl ~/.irssi ~/www/$(whoami).$(hostname -f)/public_html/rutorrent/plugins/autodl-irssi