summaryrefslogtreecommitdiff
path: root/configs/lxde-openrc/airootfs/etc/NetworkManager/dispatcher.d/reflector
blob: 17ba0990259f9f7e4022fe1526edca5608fff284 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
#
# SPDX-License-Identifier: GPL-3.0-or-later

if [ "$2" == up ] && ! grep -qoP 'mirror=\K\S+' /proc/cmdline; then
  # shellcheck disable=SC2034
  XDG_CACHE_HOME=/var/cache/reflector
  umask 177
  /usr/bin/reflector --protocol https --latest 15 --sort rate --save /etc/pacman.d/mirrorlist
fi