File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# Get transmission credentials
3
- auth=user:password
4
- host=localhost
3
+ auth=${TRANSMISSION_USER:- user} :${TRANSMISSION_PASS:- password}
4
+ host=${TRANSMISSION_HOST:- localhost}
5
+ list_url=${TRACKER_URL:- https:// raw.githubusercontent.com/ ngosang/ trackerslist/ master/ trackers_all.txt}
5
6
6
7
add_trackers () {
7
8
torrent_hash=$1
8
- for base_url in https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt ; do
9
+ for base_url in " ${list_url} " ; do
9
10
echo -e " \e[1m\e[5m"
10
11
echo " URL for ${base_url} "
11
12
echo -e " Adding trackers for \e[91m$torrent_name ..."
12
13
echo -en " \e[0m"
13
14
echo -e " \e[2m\e[92m"
14
- for tracker in $( curl -# " ${base_url} " ) ; do
15
+ for tracker in $( curl --location - # " ${base_url} " ) ; do
15
16
echo -en " \e[0m"
16
17
echo -ne " \e[93m*\e[0m ${tracker} ..."
17
18
if transmission-remote " $host " --auth=" $auth " --torrent " ${torrent_hash} " -td " ${tracker} " | grep -q ' success' ; then
You can’t perform that action at this time.
0 commit comments