Table of Contents

Shortnote

If we create a dropbox shared over the network using samba or afp, then the following script will queue any folder that is placed in the dropbox.

The script will list all directories in the /srv/rtorrent/dropbox folder and then move *.torrent files to the /srv/rtorrent/torrents/ directory and the content to /srv/rtorrent/downloads/.

Requirements

Setup

# The path to where torrent files are downloaded.
DOWNLOADS_FOLDER=/srv/rtorrent/downloads/
 
# The path to where torrent files (*.torrent) are stored.
TORRENTS_FOLDER=/srv/rtorrent/torrents/
 
# The shared path where torrent files (*.torrent) are added.
DROPBOX_FOLDER=/srv/rtorrent/dropbox/
 
# The HTTP tracker to announce.
HTTP_TRACKER=http://sow.grimore.org:65548/announce
 
# The UDP tracker to announce.
UDP_TRACKER=udp://sow.grimore.org:65548/announce

and adjust the paths and parameters accordingly - particularly, pay attention to the HTTP_TRACKER and the UDP_TRACKER settings because they are supposed to point to your tracker.

By using inotify, the script will run when a torrent file is dropped into the dropbox which is far better than using cron. However, if the latter behaviour is desired, the script may also be called from cron periodically.

Index