Automatically remove completed torrents from transmission using transmission-remote and cron.
Assumptions:
- You're on a
Synology DS412+
(NAS) - You've installed findutils (ipkg install findutils) for full versions of
find
&xargs
The script filters finished torrents from the list and removes any matching torrents.
- Place the script somewhere on your NAS. For example:
/usr/local/scripts/transmission-cleanup.sh
- Edit the
USER
andPASS
variable within the script. - Check if the location to the
transmission-remote
is correct. - Setup a cron job to run the script periodically. For example:
vi /etc/crontab
7,22,37,52 * * * * root /usr/local/scripts/transmission-cleanup.sh 2>&1 > /dev/null # run every 15 minutes
Make sure to use tabs to delimited the columns, otherwise your cron job will be lost when you reboot your NAS.