Cronjob

I have a question aubout the default cronjob that comes with pihole

there is one command for gravity, the the log flush, one to grab the local version every 10 min and one to grab the remote version every 24h.
I understand what the first two do, but not what the grab local version and grab remote version do.
Thank you in advance
Max

In /etc/pihole, you will find the following files:
GitHubVersions
localbranches
localversions
These files are used by the web interface to generate the message on the bottom, displaying the version information, and possibly, if an update is available. To avoid reading that information from the outside world, over and over again (whenever you change or refresh a page), the information is retrieved by the cron jobs, stored in the local files, and used by the web interface to display the info.

1 Like

and which part of the cronjob is for updating the pihole? on the internet I found that there should be a line updatePihole, but I couldn´t find it in the file commented out. So do I need to manually add the line?

In older versions of pihole, there used to be a cron job for pihole -up. After some really problematic udates, the developers removed this, encouraging users to update manually. A lot of users want to wait for a week or so, before taking that step.

Don't edit the pihole cron job, It will be overwritten by pihole -up or pihole -r

If you absolutely want to upgrade automatically (not recommended):
You’ll need to add a cron job.

sudo nano /etc/cron.d/piholeupdate

content:

 # Pi-hole: Update Pi-hole
30 2    * * 7   root    PATH="$PATH:/usr/local/bin/" pihole updatePihole

choose a valid time (example = 02h30) and day (example = sunday) or use * for any day

edit
NOT even sure the latest versions of pihole will update unattended!!!
/edit

ah that makes sence. I thought automatic updates might be a good thing since the pihole is in my parents home, but I guess it should be enough when I just do the updates when I visit them. However I guess I will give it a 6 months cronjob to update the root hints for unbound

and at least installing worked unattended using ansible for me and pihole -r aswell (did not test pihole -up)

The problem with automatic updates for Pi-Hole at a remote location is when Pi-Hole behavior changes with an update. As an example, when Pi-Hole 4.0 was released, the default blocking mode changed from IP to NULL. Many users wondered where their blocking page went. In V4.1, the query log now shows PTR, SOA and other types of requests (previously was A and AAAA only), and this has caused a number of questions.

For a parental installation, I would use the new version at home for a while, then decide whether it should be upgraded at the parent home. If you do update it there, you may have to make some configuration changes or explain something to them.

2 posts were split to a new topic: Static IP on Pi Zero W

I've been thinking about the update dillema and possibly found a solution, you can find it here