Skip to content

Instantly share code, notes, and snippets.

@ysl2
Forked from valeth/pacman.service
Created March 11, 2022 06:57
Show Gist options
  • Save ysl2/b4256bbfafa26bcc1bef1f298d8156a5 to your computer and use it in GitHub Desktop.
Save ysl2/b4256bbfafa26bcc1bef1f298d8156a5 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