Skip to content

Instantly share code, notes, and snippets.

@smithbr
Created February 16, 2025 00:05
Show Gist options
  • Save smithbr/652ffeecd5b86ea7feaf931b7b2f8b46 to your computer and use it in GitHub Desktop.
Save smithbr/652ffeecd5b86ea7feaf931b7b2f8b46 to your computer and use it in GitHub Desktop.
Pi-Hole update script
#!/bin/bash -e
printf "START -------------------------------------------------------\n"
printf "Date: " && echo $(date '+%d/%m/%Y %H:%M:%S')
printf "\n"
# update pi-hole
printf "\nPi-Hole:\n"
/usr/bin/sudo pihole -up
# update padd
printf "\nPADD:\n"
/usr/bin/sudo /home/pi/padd.sh -u
# update packages
printf "\nPackages:\n"
/usr/bin/sudo apt-get update --fix-missing
/usr/bin/sudo apt-get upgrade -y
/usr/bin/sudo apt-get clean all -y
/usr/bin/sudo apt-get autoclean -y
/usr/bin/sudo apt-get autoremove --purge -y
# reboot
# /usr/bin/sudo systemctl reboot -i
printf "\n"
printf "END -------------------------------------------------------\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment