Setting up automatic updates is probably a good idea.
Depending on how pihole is installed, this may not upgrade it. I personally have it installed with docker and uses watchtower for updates, but the risk with this mechanism is that it can break things.
#!/bin/sh
LOG_FILE=/var/log/update_pihole.log
echo "Starting upate" >> $LOG_FILE
date >> $LOG_FILE
pihole -up >> $LOG_FILE
pihole -g >> $LOG_FILE
exit 0However note that the developers of PiHole do not recommend automated upgrades, or at least be aware of the implications