systemd service (and timer?) for rankmirrors based mirror list updating?
I've just set up a systemd service on my machine that uses rankmirrors for replacing the systems mirrorlist on boot. This is derived from the equivalent systemd service from the reflector package.
It currently looks like this:
[Unit]
Description=Refresh Pacman mirrorlist with rankmirrors.
Wants=network-online.target
After=network-online.target nss-lookup.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c "curl 'https://archlinux.org/mirrorlist/?country=GB&protocol=https&ip_version=4&ip_version=6&use_mirror_status=on' 2>/dev/null | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 - > /etc/pacman.d/mirrorlist"
CapabilityBoundingSet=
LockPersonality=true
MemoryDenyWriteExecute=true
NoNewPrivileges=true
PrivateDevices=true
PrivateTmp=true
PrivateUsers=true
ProtectClock=true
ProtectControlGroups=true
ProtectHome=true
ProtectHostname=true
ProtectKernelTunables=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectSystem=strict
ReadWritePaths=/etc/pacman.d/mirrorlist
RemoveIPC=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=true
RestrictRealtime=true
RestrictSUIDSGID=true
SystemCallArchitectures=native
SystemCallFilter=@system-service
SystemCallFilter=~@resources @privileged
UMask=177
[Install]
WantedBy=multi-user.target
Is there an appetite by the maintainers of pacman-contrib for me to tidy this up and raise a merge request?