Update basic-install.sh

This commit is contained in:
mospaeda 2015-09-22 22:10:33 +02:00
parent 6fc798ebe4
commit 11fcfc4bf5

View file

@ -8,7 +8,6 @@
# #
# Or run the commands below in order # Or run the commands below in order
clear clear
echo " _____ _ _ _ " echo " _____ _ _ _ "
echo " | __ (_) | | | | " echo " | __ (_) | | | | "
@ -23,20 +22,17 @@ echo "Set a static IP before running this!"
echo " " echo " "
echo " Press Enter when ready " echo " Press Enter when ready "
echo " " echo " "
echo " totootototo"
read read
pihole_gitsource="https://raw.githubusercontent.com/mospaeda/pi-hole/master/"
if [[ -f /etc/dnsmasq.d/adList.conf ]];then if [[ -f /etc/dnsmasq.d/adList.conf ]];then
echo "Original Pi-hole detected. Initiating sub space transport..." echo "Original Pi-hole detected. Initiating sub space transport..."
sudo mkdir -p /etc/pihole/original/ sudo mkdir -p /etc/pihole/original/
sudo mv /etc/dnsmasq.d/adList.conf /etc/pihole/original/adList.conf.$(date "+%Y-%m-%d") mv /etc/dnsmasq.d/adList.conf /etc/pihole/original/adList.conf.$(date "+%Y-%m-%d")
sudo mv /etc/dnsmasq.conf /etc/pihole/original/dnsmasq.conf.$(date "+%Y-%m-%d") mv /etc/dnsmasq.conf /etc/pihole/original/dnsmasq.conf.$(date "+%Y-%m-%d")
sudo mv /etc/resolv.conf /etc/pihole/original/resolv.conf.$(date "+%Y-%m-%d") mv /etc/resolv.conf /etc/pihole/original/resolv.conf.$(date "+%Y-%m-%d")
sudo mv /etc/lighttpd/lighttpd.conf /etc/pihole/original/lighttpd.conf.$(date "+%Y-%m-%d") mv /etc/lighttpd/lighttpd.conf /etc/pihole/original/lighttpd.conf.$(date "+%Y-%m-%d")
sudo mv /var/www/pihole/index.html /etc/pihole/original/index.html.$(date "+%Y-%m-%d") mv /var/www/pihole/index.html /etc/pihole/original/index.html.$(date "+%Y-%m-%d")
sudo mv /usr/local/bin/gravity.sh /etc/pihole/original/gravity.sh.$(date "+%Y-%m-%d") mv /usr/local/bin/gravity.sh /etc/pihole/original/gravity.sh.$(date "+%Y-%m-%d")
else else
: :
fi fi
@ -45,6 +41,9 @@ echo "Updating the Pi..."
sudo apt-get update sudo apt-get update
sudo apt-get -y upgrade sudo apt-get -y upgrade
echo "Installing tools..."
sudo apt-get -y install bc
echo "Installing DNS..." echo "Installing DNS..."
sudo apt-get -y install dnsmasq sudo apt-get -y install dnsmasq
sudo update-rc.d dnsmasq enable sudo update-rc.d dnsmasq enable
@ -63,14 +62,14 @@ 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
sudo curl -o /etc/dnsmasq.conf $pihole_gitsource./advanced/dnsmasq.conf sudo curl -o /etc/dnsmasq.conf "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/dnsmasq.conf"
sudo curl -o /etc/lighttpd/lighttpd.conf $pihole_gitsource./advanced/lighttpd.conf sudo curl -o /etc/lighttpd/lighttpd.conf "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/lighttpd.conf"
sudo mkdir /var/www/pihole sudo mkdir /var/www/pihole
sudo curl -o /var/www/pihole/index.html $pihole_gitsource./advanced/index.html sudo curl -o /var/www/pihole/index.html "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/index.html"
echo "Locating the Pi-hole..." echo "Locating the Pi-hole..."
sudo curl -o /usr/local/bin/gravity.sh $pihole_gitsource./gravity.sh sudo curl -o /usr/local/bin/gravity.sh "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/gravity.sh"
sudo curl -o /usr/local/bin/chronometer.sh $pihole_gitsource./advanced/Scripts/chronometer.sh sudo curl -o /usr/local/bin/chronometer.sh "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/Scripts/chronometer.sh"
sudo chmod 755 /usr/local/bin/gravity.sh sudo chmod 755 /usr/local/bin/gravity.sh
sudo chmod 755 /usr/local/bin/chronometer.sh sudo chmod 755 /usr/local/bin/chronometer.sh