Skip to content

Instantly share code, notes, and snippets.

@valeth
Created December 20, 2017 21:48
Show Gist options
  • Save valeth/133094c87690aa5addb1685287cb05c8 to your computer and use it in GitHub Desktop.
Save valeth/133094c87690aa5addb1685287cb05c8 to your computer and use it in GitHub Desktop.
Pacman Updates
[Unit]
Description=Pacman system updates
After=network.target
[Service]
ExecStart=/usr/bin/pacman -Sy
[Unit]
Description=Pacman update timer
After=network.target
[Timer]
OnBootSec=5min
OnCalendar=hourly
[Install]
WantedBy=timers.target
[Unit]
Description=Pacman mirrorlist updater
After=network.target
[Service]
Type=oneshot
ExecStart=/usr/bin/reflector --protocol http --latest 30 --number 20 --sort rate --save /etc/pacman.d/mirrorlist
ExecStart=-/usr/bin/rm -v /etc/pacman.d/mirrorlist.pacnew
[Unit]
Description=Run reflector on boot and weekly
After=network.target
[Timer]
OnBootSec=5min
OnCalendar=weekly
Persistent=true
AccuracySec=12h
[Install]
WantedBy=timers.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment