#!/bin/bash # # https://code.google.com/p/pyroscope/wiki/RtControlExamples # # Socket RT_SOCKET=/var/cache/torrent/rtorrent/.scgi_local # Control app rtcontrol=/var/cache/torrent/bin/rtcontrol # Ratio Management $rtcontrol is_complete=yes is_open=yes [ ratio=+1.1 OR seedtime=+1w ] --stop # Move on Completion #$rtcontrol --from-view complete 'realpath=*/work/*' -qo '~/bin/rtmv "$(path)s" /var/cache/media/seeding --cron' | bash # Move on Done $rtcontrol --from-view complete [ 'realpath=*/work/*' OR 'realpath=*/seeding/*' ] is_open=n -qo '~/bin/rtmv "$(path)s" /var/cache/media/incoming --cron' | bash # Automatic stop of torrents having problems # Stops any torrent that isn't known by the tracker anymore, # or has other authorization problems, or lost its data test -S $RT_SOCKET && $rtcontrol --from-view started 'message=*not?registered*,*unregistered*,*not?authorized*' OR is_complete=yes is_ghost=yes --stop --cron