From e704be65c4d8df9906e1a715c0ab58986a520be0 Mon Sep 17 00:00:00 2001 From: Joseph Graham Date: Thu, 22 Jun 2017 08:31:51 +0100 Subject: Tidied up variables in preperation for moving them into a config file. --- pacman2pacman-get | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pacman2pacman-get b/pacman2pacman-get index e8c454e..581c793 100644 --- a/pacman2pacman-get +++ b/pacman2pacman-get @@ -31,9 +31,13 @@ torrent_folder='/srv/pacman2pacman/torrents' pkg_cache_location='/var/cache/pacman/pkg' -prog_check_freq=1.4 # seconds to update downlaod progress +prog_check_freq=1.4 # seconds to update download progress -stall_time='60' # if download is still at 0% after this much time, check webseed is alive +torrent_search_time=6 # seconds to spend scanning the mirrors for a torrent + +# These variables to be moved into a config file +mirrorlist_location="/etc/pacman.d/mirrorlist" +stall_time=60 # if download is still at 0% after this much time, consider download stalled # Pacman2pacman should be called like this from /etc/pacman.conf: # XferCommand = /usr/bin/pacman2pacman-get %u %o @@ -116,7 +120,7 @@ else look_for_torrent "${torrent_url}" & - done < <(grep '^Server \?= \?' "/etc/pacman.d/mirrorlist" | shuf | head -n 3) + done < <(grep '^Server \?= \?' "mirrorlist_location" | shuf | head -n 3) # Get the name of the torrent downloaded read -t 6 response < <(cat "${fifoname}") -- cgit v1.2.3