Created
January 22, 2018 15:44
-
-
Save hetykai/64600e2b8a9b837bd2fdc4a29b02210e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#/usr/sbin/service aria2 stop | |
list=`wget -qO- https://newtrackon.com/api/live|awk NF|sed ":a;N;s/\n/,/g;ta"` | |
if [ -z "`grep "bt-tracker" /media/AiDisk_a1/aria/config/aria2.conf`" ]; then | |
sed -i '$a bt-tracker='${list} /media/AiDisk_a1/aria/config/aria2.conf | |
echo add...... | |
else | |
sed -i "s@bt-tracker.*@bt-tracker=$list@g" /media/AiDisk_a1/aria/config/aria2.conf | |
echo update...... | |
fi | |
#/etc/init.d/aria2 restart | |
[ -e /media/AiDisk_a1/aria/config/incomplete.lst ] || touch /media/AiDisk_a1/aria/config/incomplete.lst | |
ENABLED=yes | |
PROCS=aria2c | |
ARGS="--conf-path=/media/AiDisk_a1/aria/config/aria2.conf" | |
PREARGS="" | |
DESC=$PROCS | |
PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
. /opt/etc/init.d/rc.func |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment