I’m in the U.S. but I don’t understand what to put in this file to make it work properly?
Once I create the file and enter the proper information for the US and enable it through systemd, does it just run automatically or is there anything else I need to do?
And if I’m using the reflector-simple GUI do I even need reflector-auto? It’s all very confusing.
For the question about reflector-simple: that may be an adequate solution.
In countries where mirrors tend to have issues every now and then, reflector-auto could be a useful solution.
In your case I assume mirrors are relatively stable (I may be wrong…) so setting mirrors with reflector-simple (maybe once or twice a year to check too?) should be OK.
All in all:
reflector-simple sets mirrors once when you run it
reflector-auto can periodically and automatically set mirrors
@manuel beat me to this but let me see if I can assist them. This post you may find helpful:
Also here:
Let us work backward for a second in respect to your post.
This is up to you. You can use one, both, or none.
Think of reflector-simple as one shop stopping. You set it up once and forget it. This means you will have a static mirror list that never changes ranked according to the options you selected via the button in the welcome app. This is made easier by having the check boxes for number of mirrors, rate (speed), and how long the mirrors refreshed last. This will not change unless you repeat the process manually.
Think of reflector-auto as a way to automatically repeat this process on a timer as a service running in the background. This is slightly more complicated because here we don’t have the handy check boxes and have to add the options manually to a file that the reflector-auto.timer service will execute automatically based on the options you have added into the file /etc/reflector-auto.conf file. So you set the options in the file by manually adding them (type them in) and the service runs the file on a timer.
Once you set the .conf and enable the timer it should just run.
Here is an example file:
## Configuration for 'reflector-auto'.
-c US
-c CA
-p https
-a 4
-f 10
--sort rate
-c sets the country. So the first two look for mirrors in the US and Canada.
-p sets the protocol (there is also a checkbox for this in reflector-simple) I only use https
-a sets how many hours since the mirror last refreshed. The example uses 4 I use 2.
-f how many mirrors you would like to pull in to use.
–sort rate (speed).
@manuel if I have said anything wrong here please correct.
Seems that reflector devs have added the service feature directly to the reflector package less than a week ago. Thanks for informing, didn’t know they did that.
I’ll take a look at the new feature, and see if that would cause changes to reflector-auto.
Reflector devs have added a similar systemd integration to reflector what EndeavourOS has in reflector-auto.
Because of that, there’s no reason to develop reflector-auto further (unless someone has a really great new idea for it ).
So I’ll keep reflector-auto available for a while (i.e. until the end of year 2020 at least), but eventually it is bound to be replaced with the similar feature of reflector.
I’ll update the EndeavourOS wiki too about this new turn of events.
I am mostly asking because quite frankly I have never used the systemctl edit function before and I am in no way knowing the syntax for changing the timer. But weekly is what I had planned for it so…
It is a simple text file at /usr/lib/systemd/system/reflector.timer.
So basically you can edit it with a normal text editor and then restart the timer using proper systemctl command.
Huh.
Not that it’s a big problem but curious:
It is set to be within 1 second BUT have a random +12 hours. Seems overkill to have a 1 second accuracy if you have that random margin…
(Reading the systemd wiki it’s said a setting like this is to avoid workload spikes for scheduled tasks, but that seems to be a server issue, mostly.)
So, changed that random delay to 1 hour. No need of having it randomly switch day of the week within the first well… week.
@manuel So it seems like reflector-simple would be the easiest thing for me to use right now? It’s more confusing now that reflector-auto will be gone soon.
@Elloquin thank you for this tremendously detailed instruction set. I think I’ll just use reflector-simple for now since reflector-auto appears to be going away soon.
The reflector-simple tool is very useful and simple to use.
I’d say it is OK to use only reflector-simple and occasionally use it again if some mirrors start failing.
You can use reflector too, no problem. They both create the mirrorlist file at /etc/pacman.d/mirrorlist. Reflector-simple is simply a GUI for reflector.