Skip to content

Commit

Permalink
Add aria2 download hook example (wahyd4#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
wahyd4 authored Oct 24, 2021
1 parent 7678965 commit cc16fa5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions conf/aria2-sample-hook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /bin/bash -eu

# For more details about how to use this feature, see: https://aria2.github.io/manual/en/html/aria2c.html#event-hook

echo "[INFO] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Aria2 hook triggered with parameters: GID [$1], Files Count: [$2], Files Path: [$3]"
10 changes: 8 additions & 2 deletions conf/aria2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ disable-ipv6=true
# General Options
log=/var/log/aria2.log
#You can set either debug, info, notice, warn or error.
log-level=notice
log-level=warn


## 进度保存相关 ##
## Related to save downloading progress ##
# 从会话文件中读取下载任务
input-file=/app/conf/aria2.session
# 在Aria2退出时保存`错误/未完成`的下载任务到会话文件
Expand All @@ -67,3 +67,9 @@ save-session-interval=10

# BT trackers from https://trackerslist.com/best.txt updated on 2021-06-06
bt-tracker=http://1337.abcvg.info:80/announce,http://nyaa.tracker.wf:7777/announce,http://opentracker.xyz:80/announce,http://rt.tace.ru:80/announce,http://share.camoe.cn:8080/announce,http://t.nyaatracker.com:80/announce,http://torrentsmd.com:8080/announce,http://tr.cili001.com:8070/announce,http://tracker-cdn.moeking.me:2095/announce,http://tracker.anirena.com:80/announce,http://tracker.anirena.com:80/b16a15d9a238d1f59178d3614b857290/announce,http://tracker.anonwebz.xyz:8080/announce,http://tracker.bt4g.com:2095/announce,http://tracker.files.fm:6969/announce,http://tracker.gbitt.info:80/announce,http://tracker.ipv6tracker.ru:80/announce,http://tracker.noobsubs.net:80/announce,http://tracker.shittyurl.org:80/announce,http://tracker.tfile.co:80/announce,http://tracker.tfile.me:80/announce,http://tracker.trackerfix.com:80/announce,http://vps02.net.orel.ru:80/announce,https://1337.abcvg.info:443/announce,https://tr.torland.ga:443/announce,https://tracker.coalition.space:443/announce,https://tracker.gbitt.info:443/announce,https://tracker.lilithraws.cf:443/announce,https://tracker.nanoha.org:443/announce,https://tracker.nitrix.me:443/announce,https://tracker.parrotsec.org:443/announce,https://tracker.shittyurl.org:443/announce,https://tracker.tamersunion.org:443/announce,https://w.wwwww.wtf:443/announce,udp://6rt.tace.ru:80/announce,udp://9.rarbg.com:2830/announce,udp://9.rarbg.me:2710/announce,udp://9.rarbg.to:2710/announce,udp://app.icon256.com:8000/announce,udp://bubu.mapfactor.com:6969/announce,udp://discord.heihachi.pw:6969/announce,udp://exodus.desync.com:6969/announce,udp://explodie.org:6969/announce,udp://fe.dealclub.de:6969/announce,udp://inferno.demonoid.is:3391/announce,udp://ipv6.tracker.zerobytes.xyz:16661/announce,udp://mail.realliferpg.de:6969/announce,udp://movies.zsw.ca:6969/announce,udp://mts.tvbit.co:6969/announce,udp://open.demonii.com:1337/announce,udp://open.stealth.si:80/announce,udp://opentor.org:2710/announce,udp://opentracker.i2p.rocks:6969/announce,udp://p4p.arenabg.ch:1337/announce,udp://p4p.arenabg.com:1337/announce,udp://pow7.com:80/announce,udp://retracker.hotplug.ru:2710/announce,udp://retracker.lanta-net.ru:2710/announce,udp://retracker.netbynet.ru:2710/announce,udp://retracker01-msk-virt.corbina.net:80/announce,udp://t1.leech.ie:1337/announce,udp://t2.leech.ie:1337/announce,udp://thetracker.org:80/announce,udp://torrentclub.online:54123/announce,udp://tracker-de.ololosh.space:6969/announce,udp://tracker.0x.tf:6969/announce,udp://tracker.altrosky.nl:6969/announce,udp://tracker.army:6969/announce,udp://tracker.beeimg.com:6969/announce,udp://tracker.birkenwald.de:6969/announce,udp://tracker.blacksparrowmedia.net:6969/announce,udp://tracker.breizh.pm:6969/announce,udp://tracker.ccp.ovh:6969/announce,udp://tracker.cyberia.is:6969/announce,udp://tracker.dler.com:6969/announce,udp://tracker.internetwarriors.net:1337/announce,udp://tracker.moeking.me:6969/announce,udp://tracker.nrx.me:6969/announce,udp://tracker.ololosh.space:6969/announce,udp://tracker.openbittorrent.com:6969/announce,udp://tracker.opentrackr.org:1337/announce,udp://tracker.shkinev.me:6969/announce,udp://tracker.theoks.net:6969/announce,udp://tracker.tiny-vps.com:6969/announce,udp://tracker.torrent.eu.org:451/announce,udp://tracker.uw0.xyz:6969/announce,udp://tracker.zerobytes.xyz:1337/announce,udp://tracker0.ufibox.com:6969/announce,udp://tracker1.bt.moack.co.kr:80/announce,udp://tracker1.itzmx.com:8080/announce,udp://tracker2.dler.com:80/announce,udp://tracker2.dler.org:80/announce,udp://tracker2.itzmx.com:6961/announce,udp://tracker3.itzmx.com:6961/announce,udp://tracker4.itzmx.com:2710/announce,udp://u.wwwww.wtf:1/announce,udp://valakas.rollo.dnsabr.com:2710/announce,udp://vibe.community:6969/announce,udp://wassermann.online:6969/announce,udp://www.torrent.eu.org:451/announce

# The script to be run when download completes
on-download-complete=/app/conf/aria2-sample-hook.sh

# The script to be run when download fails
on-download-error=/app/conf/aria2-sample-hook.sh
2 changes: 1 addition & 1 deletion new-version-checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ APP_VERSION=$(cat APP_VERSION)
set +e
while true; do
echo "[INFO] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Checking for new version against ${APP_VERSION} ..."
newer_version=$(curl --max-time 6 -s https://badges.toozhao.com/val/aria2-ui-docker?version=${APP_VERSION})
newer_version=$(curl --max-time 6 -s "https://badges.toozhao.com/val/aria2-ui-docker?version=${APP_VERSION}&arch=$(arch)")
if [[ -z ${newer_version} ]]; then
echo "[WARN] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Failed to check new version."
sleep 86400
Expand Down

0 comments on commit cc16fa5

Please sign in to comment.