Skip to content

Instantly share code, notes, and snippets.

@adamlwgriffiths
Last active October 2, 2020 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamlwgriffiths/57a9dd8822357418d4cfcf7b34c39930 to your computer and use it in GitHub Desktop.
Save adamlwgriffiths/57a9dd8822357418d4cfcf7b34c39930 to your computer and use it in GitHub Desktop.
Pi-hole update Cron job

Copy to /etc/cron.d/pihole-update You cannot edit the existing /etc/cron.d/pihole script as it will over-write itself on first update.

Why this isn't shipped with PiHole itself, is just fucking beyond me.

I for one LOVE SSH'ing into all my IoT devices every week to run random commands just to keep them up to date.

All hail our PHP overlords.

# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# Updates pi hole every week
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.
#
#
#
# Pi-hole: Update the software once a week on Sunday at a random time in the
# early morning. Download any updates from the adlists
# Squash output to log, then splat the log to stdout on error to allow for
# standard crontab job error handling.
7 4 * * 7 root PATH="$PATH:/usr/local/bin/" pihole updatePihole >/var/log/pihole_update.log || cat /var/log/pihole_update.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment