Created
November 9, 2022 08:55
-
-
Save benstaker/ba65c7bc9b41c0c7e1491b1643e697d4 to your computer and use it in GitHub Desktop.
Update PiHole / Raspberry Pi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LOG_FILE=./update.log | |
touch $LOG_FILE | |
> $LOG_FILE | |
echo "START." 2>&1 | tee $LOG_FILE | |
echo "----------------------------------------" 2>&1 | tee $LOG_FILE | |
echo "Updating PiHole..." 2>&1 | tee $LOG_FILE | |
pihole -up 2>&1 | tee $LOG_FILE | |
echo "----------------------------------------" 2>&1 | tee $LOG_FILE | |
echo "----------------------------------------" 2>&1 | tee $LOG_FILE | |
echo "Updating package lists..." 2>&1 | tee $LOG_FILE | |
sudo apt-get update 2>&1 | tee $LOG_FILE | |
echo "----------------------------------------" 2>&1 | tee $LOG_FILE | |
echo "----------------------------------------" 2>&1 | tee $LOG_FILE | |
echo "Upgrading dependencies..." 2>&1 | tee $LOG_FILE | |
sudo apt-get upgrade 2>&1 | tee $LOG_FILE | |
echo "----------------------------------------" 2>&1 | tee $LOG_FILE | |
echo "----------------------------------------" 2>&1 | tee $LOG_FILE | |
echo "Upgrading system..." 2>&1 | tee $LOG_FILE | |
sudo apt-get dist-upgrade 2>&1 | tee $LOG_FILE | |
echo "----------------------------------------" 2>&1 | tee $LOG_FILE | |
echo "END." 2>&1 | tee $LOG_FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment