Today I dealt with the issue that all my Rasberry Pis were running a version of the OS that was quite old. This also lead to me setting up a new pihole computer, which now updates with the following script:
#!/bin/bash
echo "updateall v.1.4 for Raspian"
#Run this as a normal user. Your admin password will be asked for if required.
sudo apt update
sudo apt upgrade -y
sudo apt full-upgrade -y
pihole -up
echo "The script has now finished running."