2022-01-25 23:54:43 -06:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
curl -s https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/pacman-mirrorlist/trunk/mirrorlist | awk '/^## United States$/{f=1; next}f==0{next}/^$/{exit}{print substr($0, 1);}' | sed 's/^#Server/Server/' > /tmp/candidates
|
2023-11-30 02:47:16 -06:00
|
|
|
cat <<EOM > ../roles/Maat/files/pacoloco.yaml
|
|
|
|
port: 9129
|
|
|
|
download_timeout: 3600 # download will timeout after 3600 seconds
|
|
|
|
cache_dir: /var/cache/pacoloco
|
|
|
|
purge_files_after: 360000 # 360000 seconds or 100 hours, 0 to disable
|
|
|
|
repos:
|
|
|
|
archlinux:
|
|
|
|
urls:
|
|
|
|
$(rankmirrors -n 6 /tmp/candidates | sed 's/^Server = / - /' | grep -v generated\ by | cut -f 1 -d \$)
|
|
|
|
user_agent: Pacoloco
|
|
|
|
EOM
|