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 1
1
#! /bin/bash
2
2
# Get transmission credentials
3
3
auth=user:password
4
+ host=localhost
4
5
5
6
add_trackers () {
6
7
torrent_hash=$1
@@ -13,7 +14,7 @@ add_trackers () {
13
14
for tracker in $( curl -# " ${base_url} " ) ; do
14
15
echo -en " \e[0m"
15
16
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
17
18
echo -e ' \e[91m failed.'
18
19
echo -en " \e[0m"
19
20
else
25
26
}
26
27
27
28
# 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 }' ) "
29
30
30
31
for 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-) "
33
34
add_trackers " $hash "
34
35
done
Original file line number Diff line number Diff line change 2
2
# Get transmission credentials and ip or dns ardress
3
3
auth=user:password
4
4
host=localhost
5
+
5
6
while true ; do
6
7
sleep 25
7
8
add_trackers () {
You can’t perform that action at this time.
0 commit comments