1. vi /root/trackers-list-aria2.sh
  2. 内容如下:
  1. #!/bin/bash
  2. #/usr/sbin/service aria2 stop
  3. list=`wget -qO- https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt|awk NF|sed ":a;N;s/\n/,/g;ta"`
  4. if [ -z "`grep "bt-tracker" /conf/aria2.conf`" ]; then
  5. sed -i \'$a bt-tracker=\'${list} /conf/aria2.conf
  6. echo add......
  7. else
  8. sed -i "s@bt-tracker.*@bt-tracker=$list@g" /conf/aria2.conf
  9. echo update......
  10. fi

  

 #授权脚本 chmod +x /root/trackers-list-aria2.sh

  1.  

版权声明:本文为yangjig原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/yangjig/p/10023388.html