blob: 7427b9fc33d73286e17f12d10427c8d5e975384c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/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
|