|
我转过来的
) D$ T; I8 F) n8 S% Z' M7 ]list=`wget -qO- https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt|awk NF|sed ":a;N;s/\n/,/g;ta"`, K5 E( y! \$ r
if [ -z "`grep "bt-tracker" /etc/aria2/aria2.conf`" ]; then. F3 F6 |. z& b* S9 N" C9 l/ @5 P
sed -i '$a bt-tracker='${list} /etc/aria2/aria2.conf0 m9 B; m$ ~+ P
echo add....... J& o4 Z4 J! ?% S0 [: j
else# h; ]- a9 f# n) u d u6 _/ i
sed -i "s@bt-tracker.*@bt-tracker=$list@g" /etc/aria2/aria2.conf2 L, B- ?4 m& R1 ]2 Y8 h
echo update......
) p. W" g! k+ f! J- Z C' Lfi% w' }& y8 q( b* K: A4 I) @4 ]
4 O1 d' } h- u& r8 X. y1 \
/etc/aria2/aria2.conf 就是你的 aria2 的 config 文件。自己修改路径) z, [8 q4 p# P5 v
上面这一段操作前,在关闭 aria2:service aria2 stop1 ]6 K2 s/ {3 a; X) c- c
最后启动 aria2:service aria2 start
$ A( E. i) I' V2 G1 ?5 V2 O, _( r4 ?/ T& r/ F5 x
|
|