File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22# Get transmission credentials
33auth=user:password
4+ host=localhost
45
56add_trackers () {
67 torrent_hash=$1
@@ -13,7 +14,7 @@ add_trackers () {
1314for tracker in $( curl -# " ${base_url} " ) ; do
1415 echo -en " \e[0m"
1516 echo -ne " \e[93m*\e[0m ${tracker} ..."
16- if transmission-remote --auth=" $auth " --torrent " ${torrent_hash} " -td " ${tracker} " | grep -q ' success' ; then
17+ if transmission-remote " $host " --auth=" $auth " --torrent " ${torrent_hash} " -td " ${tracker} " | grep -q ' success' ; then
1718 echo -e ' \e[91m failed.'
1819 echo -en " \e[0m"
1920else
2526}
2627
2728# Get list of active torrents
28- ids=" $( transmission-remote --auth=" $auth " --list | grep -vE ' Seeding|Stopped|Finished' | grep ' ^ ' | awk ' { print $1 }' ) "
29+ ids=" $( transmission-remote " $host " --auth=" $auth " --list | grep -vE ' Seeding|Stopped|Finished' | grep ' ^ ' | awk ' { print $1 }' ) "
2930
3031for id in $ids ; do
31- hash=" $( transmission-remote --auth=" $auth " --torrent " $id " --info | grep ' ^ Hash: ' | awk ' { print $2 }' ) "
32- torrent_name=" $( transmission-remote --auth=" $auth " --torrent " $id " --info | grep ' ^ Name: ' | cut -c 9-) "
32+ hash=" $( transmission-remote " $host " --auth=" $auth " --torrent " $id " --info | grep ' ^ Hash: ' | awk ' { print $2 }' ) "
33+ torrent_name=" $( transmission-remote " $host " --auth=" $auth " --torrent " $id " --info | grep ' ^ Name: ' | cut -c 9-) "
3334 add_trackers " $hash "
3435done
Original file line number Diff line number Diff line change 22# Get transmission credentials and ip or dns ardress
33auth=user:password
44host=localhost
5+
56while true ; do
67sleep 25
78add_trackers () {
You can’t perform that action at this time.
0 commit comments