|
我转过来的
1 y3 l* ~5 K$ h7 q! r U1 B8 x$ j# tlist=`wget -qO- https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt|awk NF|sed ":a;N;s/\n/,/g;ta"`
' K" c. `4 p2 C. z1 e, Tif [ -z "`grep "bt-tracker" /etc/aria2/aria2.conf`" ]; then& Q/ ~, m& I! ~" ]& C2 Z' g$ z
sed -i '$a bt-tracker='${list} /etc/aria2/aria2.conf
% @$ C4 `2 ~( h$ Vecho add......; h$ s' f& r2 ]9 b9 B; {
else! C9 _1 c; _3 ~5 V& E0 \9 `
sed -i "s@bt-tracker.*@bt-tracker=$list@g" /etc/aria2/aria2.conf: ^: G4 S2 I) ^: p6 J( M
echo update......
7 F3 } g. Z" x4 i2 }1 g; Ifi. y1 J6 G, w3 q& L
7 a6 m0 W. A$ G1 ^! v- w4 v' p$ L6 Y
/etc/aria2/aria2.conf 就是你的 aria2 的 config 文件。自己修改路径2 K8 }% r( a' D/ q5 ?
上面这一段操作前,在关闭 aria2:service aria2 stop
9 @4 V9 p6 \4 n0 e% g3 m最后启动 aria2:service aria2 start
* R" i: p5 |' L, D* Y& h! |2 Y7 y) e% C' L
|
|