Skip to content

Instantly share code, notes, and snippets.

@root-hal9000
root-hal9000 / removecompletedtorrents.sh
Created September 29, 2019 19:38 — forked from bulljit/removecompletedtorrents.sh
Transmission-Daemon: Remove Completed Torrents
#!/bin/bash
# script to check for complete torrents in transmission folder, then stop and move them
# either hard-code the MOVEDIR variable here…
MOVEDIR=/data/complete
USER=YOUR_USER_NAME
PASS=YOUR_PASS
# use transmission-remote to get torrent list from transmission-remote list
# use sed to delete first / last line of output, and remove leading spaces
# use cut to get first field from each line
TORRENTLIST=`transmission-remote -n $USER:$PASS --list | sed -e '1d;$d;s/^ *//' | cut --only-delimited -d ' ' --fields=1`