Run Reflector Through Systemd

I installed reflector as i've said in this post. Now I want to run reflector regularly so that whenever I do a pacman update I can be assured that the mirrors are also updated. Setting this weekly is I think reasonable enough. I want to use systemd to do this.

/etc/systemd/system/reflector.service

[Unit]
Description=Pacman mirrorlist update

[Service]
Type=oneshot
ExecStart=/usr/bin/reflector --verbose --latest 5 --sort rate --save /etc/pacman.d/mirrorlist

Save the file. Start the service.

To set this service every week.

/etc/systemd/system/reflector.timer
[Unit]
Description=Run reflector weekly

[Timer]
OnCalendar=weekly
RandomizedDelaySec=12h
Persistent=true

[Install]
WantedBy=timers.target

Save the file. Start the timer.
Post a Comment

Popular posts from this blog

GnuCash In Arch Linux

America Must Evolve Fast Or Die

Update for Spectre And Meltdown, A Script for Checking Your System