1
0
mirror of https://github.com/moparisthebest/pi-hole synced 2024-11-22 17:22:16 -05:00

working copy (I think)

for use with the upcoming Raspberry Pi, ad-blocking, wireless router.
This commit is contained in:
jacobsalmela 2015-02-08 17:17:45 -06:00
parent eb4d2382cd
commit fe4e579005

View File

@ -19,27 +19,29 @@ echo " "
echo " Raspberry Pi Ad-blocker " echo " Raspberry Pi Ad-blocker "
echo " " echo " "
echo " Automated install " echo " Automated install "
echo " --Basic-- " echo " --Advanced-- "
echo " " echo " "
echo " " echo " "
sleep 2 sleep 2
# Update the Pi echo "Updating the Pi..."
sudo apt-get update sudo apt-get update
sudo apt-get -y upgrade sudo apt-get -y upgrade
# Install DNS echo "Installing DNS..."
sudo apt-get -y install dnsutils dnsmasq sudo apt-get -y install dnsutils dnsmasq
sudo service dnsmasq stop
# Install lighttpd Web server echo "Installing a Web server"
sudo apt-get -y install lighttpd sudo apt-get -y install lighttpd
sudo chown www-data:www-data /var/www sudo chown www-data:www-data /var/www
sudo chmod 775 /var/www sudo chmod 775 /var/www
sudo usermod -a -G www-data pi sudo usermod -a -G www-data pi
echo "Stopping services to modify them..."
sudo service dnsmasq stop
sudo service lighttpd stop sudo service lighttpd stop
# Backup original config files and download new ones echo "Backing up original config files and downloading Pi-hole ones..."
sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
sudo mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig sudo mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig
sudo mv /var/www/index.lighttpd.html /var/www/index.lighttpd.orig sudo mv /var/www/index.lighttpd.html /var/www/index.lighttpd.orig
@ -48,11 +50,17 @@ sudo curl -o /etc/lighttpd/lighttpd.conf "https://raw.githubusercontent.com/jaco
sudo mkdir /var/www/pihole sudo mkdir /var/www/pihole
sudo curl -o /var/www/pihole/index.html "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/index.html" sudo curl -o /var/www/pihole/index.html "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/index.html"
# Download the ad list echo "Turning services back on..."
sudo curl -o /usr/local/bin/gravity.sh "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/gravity.sh"
sudo chmod 755 /usr/local/bin/gravity.sh
sudo /usr/local/bin/gravity.sh
# Open your Pi-hole
sudo service dnsmasq start sudo service dnsmasq start
sudo service lighttpd start sudo service lighttpd start
echo "Locating the Pi-hole..."
sudo curl -o /usr/local/bin/gravity.sh "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/gravity-adv.sh"
sudo chmod 755 /usr/local/bin/gravity.sh
echo "Entering the event horizon..."
sudo /usr/local/bin/gravity.sh
echo "Restarting services..."
sudo service dnsmasq restart
sudo service lighttpd restart