Last active
July 10, 2019 16:00
-
-
Save trickypr/11e2ff01756eb8b9f3b5045b2626c513 to your computer and use it in GitHub Desktop.
The code for installing unifi on a rasberry pi
This file contains hidden or 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
echo "=================" | |
echo "Installing Pi-hole®" | |
echo "" | |
echo "Install and configure" | |
curl -sSL https://install.pi-hole.net | bash | |
echo "" | |
echo "Change password" | |
pihole -a -p |
This file contains hidden or 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
echo "=================" | |
echo "Installing unifi" | |
echo "" | |
echo "Adding key" | |
echo 'deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list | |
echo "" | |
echo "Adding GPG Key" | |
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ubnt.com/unifi/unifi-repo.gpg | |
echo "" | |
echo "Getting latest package info" | |
sudo apt update | |
echo "" | |
echo "Installing java" | |
sudo apt-get -y install oracle-java8-jdk | |
echo "" | |
echo "Installing unifi package!" | |
sudo apt install -y unifi | |
echo "" |
This file contains hidden or 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
echo "Note: May requre sudo pasword during install" | |
echo "" | |
echo "=================" | |
echo "Updating and upgrading" | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get autoremove | |
sudo apt-get autoclean | |
echo "" | |
read -e -p "Install unifi [y, N]? " choice | |
[[ "$choice" == [Yy]* ]] && wget https://gist.githubusercontent.com/trickypr/11e2ff01756eb8b9f3b5045b2626c513/raw/810b08a183c6a7745e50ca3629acfa863c569008/unifi.sh -O - | sh || echo "" | |
read -e -p "Install pihole [y, N]? " choice | |
[[ "$choice" == [Yy]* ]] && wget https://gist.githubusercontent.com/trickypr/11e2ff01756eb8b9f3b5045b2626c513/raw/810b08a183c6a7745e50ca3629acfa863c569008/pihole.sh -O - | sh || echo "" | |
echo "Done! You may need to reboot" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run with:
wget https://gist.githubusercontent.com/trickypr/11e2ff01756eb8b9f3b5045b2626c513/raw/4740f5879a5d2f9eb8fc8ce9bc0bc266c402c420/unifiRPI.sh -O - | sh