diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2018-09-25 02:23:49 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2018-09-25 02:27:34 -0400 |
commit | 19732f071794d73a5598a41de3e6caa4c77acd81 (patch) | |
tree | 1327ae629437a9870773d853c084a3206818e2f8 | |
parent | fa2fbd5d0fd120ec6774f6b28bea4dfaf456ab00 (diff) |
make_repo_torrents: Make it possible to configure multiple web-seeds
-rwxr-xr-x | cron-jobs/make_repo_torrents | 4 | ||||
-rw-r--r-- | torrent.conf | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/cron-jobs/make_repo_torrents b/cron-jobs/make_repo_torrents index b911471..8c79df2 100755 --- a/cron-jobs/make_repo_torrents +++ b/cron-jobs/make_repo_torrents @@ -29,7 +29,7 @@ set -eE mkdir -p -- "${FTP_BASE}/${TORRENTPOOL}" cd "${FTP_BASE}/${TORRENTPOOL}" -IFS=, # for ${TRACKERS[*]} +IFS=, # for ${TRACKERS[*]} and ${WEBSEEDS[*]} # Find any packages for pkgfile in "$FTP_BASE"/pool/*/*${PKGEXTS}; do @@ -39,7 +39,7 @@ for pkgfile in "$FTP_BASE"/pool/*/*${PKGEXTS}; do if ! [[ -f ${pkgfile##*/}.torrent ]]; then mktorrent \ --announce="${TRACKERS[*]}" \ - --web-seed="${WEBSEED_MIRROR}${pkgfile#"${FTP_BASE}/"}" \ + --web-seed="${WEBSEEDS[*]/%/"/${pkgfile#"${FTP_BASE}/"}"}" \ -- "${pkgfile}" >/dev/null fi done diff --git a/torrent.conf b/torrent.conf index bd09aed..1a64b1e 100644 --- a/torrent.conf +++ b/torrent.conf @@ -6,10 +6,12 @@ TRACKERS=( udp://tracker.pirateparty.gr:6969/announce # from https://github.com/ngosang/trackerslist ) -# This mirror is put as a webseed. Which mirror we use for a webseed +# Mirrors to put as webseeds. Which mirrors we use for webseeds # doesn't really matter since it's re-written on the client machine by # pacman2pacman so it won't normally be used anyway. -WEBSEED_MIRROR='https://repomirror.parabola.nu/' +WEBSEEDS=( + 'https://repomirror.parabola.nu/' +) # Where under $FTP_BASE/ to put the torrents TORRENTPOOL=torrents |