Send e-mail or notification when pihole -up updates Pi-Hole

Transporting from GitHub:

Send e-mail or notification when pihole -up updates Pi-Hole

you can already do this, you'll need to make some modifications

  1. install mail as described in section 4.8 of this manual
    2.enable the Pi-hole update in /etc/cron.d/pihole (uncomment line 22)
  2. modify /opt/pihole/update.sh (these modification will solve the "command not found" errors)
    line 82: piholeVersion=$(**/etc/.pihole/pihole -v -p -c)
    line 83: piholeVersionLatest=$(
    /etc/.pihole/pihole -v -p -l)
    line 85: webVersion=$(
    /etc/.pihole/pihole -v -a -c)
    line 86: webVersionLatest=$(
    /etc/.pihole/**pihole -v -a -l)

you will get a weekly mail, see below:

To: root
Subject: Cron root@raspberrypi /usr/local/bin/pihole updatePihole

::: Checking for updates...
:::
::: Pi-hole version is v2.9.5 (Latest version is v2.9.5)
::: Web Admin version is v1.4.4.2 (Latest version is v1.4.4.2)
:::
::: Everything is up to date!