1. 程式人生 > >aria2自動更新BT Tracker伺服器列表指令碼

aria2自動更新BT Tracker伺服器列表指令碼

vi /root/trackers-list-aria2.sh
內容如下:

#!/bin/bash
#/usr/sbin/service aria2 stop
list=`wget -qO- https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt|awk NF|sed ":a;N;s/\n/,/g;ta"`
if [ -z "`grep "bt-tracker" /conf/aria2.conf`" ]; then
    sed -i '$a bt-tracker='${list} /conf/aria2.conf
    echo add......
else
    sed -i "
[email protected]
*@[email protected]" /conf/aria2.conf echo update...... fi

  

 #授權指令碼 chmod +x /root/trackers-list-aria2.sh