Wiki > Autodl-irssi
Autodl-irssi is a method of automatically downloading torrents from IRC announce channels based on defined filters.
A valid configuration file is required to activate the ruTorrent plug-in.
Installation
If you do not already have autodl-irssi configuration files created on your slot:
- SSH into your server.
- Download autodlsetup.sh.
wget https://whatbox.ca/shell/autodl-setup.sh
- Run the downloaded script.
bash autodl-setup.sh
- You can now manage autodl-irssi with the ruTorrent plugin. Access ruTorrent at https://server.whatbox.ca/webui
Configuration
You can find a comprehensive usage guide in the community docs.
Configuration files
All filters and other options are read from ~/.autodl/autodl.cfg. If you use non-ASCII characters, be sure to set the encoding (or character coding) to UTF-8 before saving it. The file will be automatically re-read whenever you make any modifications to it when autodl-irssi is running.
Note: Configuration for use with rTorrent can now be done through the ruTorrent plug-in, so manual configuration for rTorrent through the autodl.cfg configuration file is unnecessary unless you do not wish to use the ruTorrent plug-in.
Automatically restart
Below are steps to take to have your irssi instance automatically restart if it crashes, or if the server is rebooted.
-
Make a file to be used for the script.
touch ~/irssi_restart.cron
-
Edit the file and enter the text below.
nano -w ~/irssi_restart.cron
#!/bin/bash if pgrep -fx "irssi" > /dev/null then echo "irssi is running." else echo "irssi is not running, starting irssi" screen -dmS autodl irssi fi exit
-
Save the file with Ctrl+x and the "y" and Enter to accept overwriting.
-
Make the script executable.
chmod +x ~/irssi_restart.cron
-
Open your crontab.
nano crontab -e
-
Enter the following text
@reboot /home/user/irssi_restart.cron >/dev/null 2>&1 */5 * * * * /home/user/irssi_restart.cron >/dev/null 2>&1
-
Save the crontab with Ctrl+x and the "y" and Enter to accept overwriting.
Manual installation (optional)
irssi
- SSH into your server.
- Start irssi with the command
irssi
- Create a new hidden window.
/window new hidden
- Name that window "autodl".
/window name autodl
- Move the new window to position 2.
/window move 2
- Save the layout.
/layout save
- Save all settings.
/save
- Exit irssi.
/exit
autodl-irssi
mkdir -p ~/.irssi/scripts/autorun
cd ~/.irssi/scripts
wget -O autodl-irssi.zip https://github.com/autodl-community/autodl-irssi/releases/download/2.6.2/autodl-irssi-v2.6.2.zip
unzip -o autodl-irssi.zip
rm autodl-irssi.zip
cp autodl-irssi.pl autorun/
mkdir -p ~/.autodl
touch ~/.autodl/autodl.cfg
The configuration file has now been created, and is located at ~/.autodl/autodl.cfg
To edit it, use nano ~/.autodl/autodl.cfg
Once you have configured the autodl.cfg file, start irssi and the script will automatically run.
It is recommended to run irssi in a screen, so that you may close the terminal and irssi will continue to run.
screen -S autodl irssi
will create a screen named "autodl" and it will run the program "irssi".
To close the irssi session and have it continue running, simply detach from the screen with Ctrl+A, d
To reattach to the irssi session and view matches as they occur, run screen -r autodl
Manual configuration options (advanced)
rTorrent
[options]
max-saved-releases = 1000
save-download-history = true
download-duplicates = false
upload-type = rtorrent
rt-dir = ~/files
rt-address = ~/.config/rtorrent/socket
update-check = auto
unique-torrent-names = false
For other clients, use upload-type = watchdir
and specify a path using upload-watch-dir
.
Issues
"Error downloading files. Make sure autodl-irssi is started and configured properly (eg. password, port number): Error getting files listing: Error: Could not connect: (111) Connection refused"
This means that irssi is not running or multiple instances are running.
SSH into the server and run killall irssi; screen -dmS autodl irssi
To disable autodl-irssi in irssi for regular use run /script unload autodl_irssi
in the irssi session.