修改aria2的启动脚本,添加尽可能多的trackers以便于加速

This commit is contained in:
Feng Yu
2020-04-27 21:34:45 +08:00
parent 183acfd29f
commit fa2b06dd50
3 changed files with 6 additions and 4 deletions

View File

@@ -46,7 +46,7 @@ dir=/extdisks/sda1/下载
#dht-file-path=/extdisks/sda1/下载/.aria2/dht.dat #dht-file-path=/extdisks/sda1/下载/.aria2/dht.dat
#dht-file-path6=/extdisks/sda1/下载/.aria2/dht6.dat #dht-file-path6=/extdisks/sda1/下载/.aria2/dht6.dat
#bt-tracker #bt-tracker
#bt-tracker= bt-tracker=
#文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用, 需要1.16及以上版本 #文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用, 需要1.16及以上版本
#disk-cache=0 #disk-cache=0
#另一种Linux文件缓存方式, 使用前确保您使用的内核支持此选项, 需要1.15及以上版本(?) #另一种Linux文件缓存方式, 使用前确保您使用的内核支持此选项, 需要1.15及以上版本(?)

View File

@@ -4,5 +4,5 @@ needver="0.1.7"
backupfiles="config/aria2.conf" backupfiles="config/aria2.conf"
supports="linux_arm,linux_mips,linux_x86_64" supports="linux_arm,linux_mips,linux_x86_64"
appinfo="Linux下一款高效的下载工具" appinfo="Linux下一款高效的下载工具"
newinfo="更新arm版aria2版本webui版本" newinfo="使用尽可能多的trackers以便于加速"
version="0.0.9" version="0.1.0"

View File

@@ -40,7 +40,9 @@ set_config() {
fi fi
# 自动更新bt-tracker # 自动更新bt-tracker
list=`wgetlist https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt|awk NF|sed ":a;N;s/\n/,/g;ta"` list1="$(wgetlist https://cdn.jsdelivr.net/gh/ngosang/trackerslist/trackers_all.txt)"
list2="$(wgetlist https://trackerslist.com/all.txt)"
list="$(echo -e "${list1}\n${list2}" | sort -u | awk NF | sed ":a;N;s/\n/,/g;ta")"
if [ ! -z "${list}" ]; then if [ ! -z "${list}" ]; then
sed -i "s#.*bt-tracker.*#bt-tracker=${list}#" ${mbroot}/apps/${appname}/config/${appname}.conf sed -i "s#.*bt-tracker.*#bt-tracker=${list}#" ${mbroot}/apps/${appname}/config/${appname}.conf
logsh "$service" "更新bt-tracker" logsh "$service" "更新bt-tracker"