From 8718321727913feaf6adfa73e2709b6607a77880 Mon Sep 17 00:00:00 2001 From: mospaeda Date: Fri, 18 Sep 2015 00:06:04 +0200 Subject: [PATCH 1/9] Update basic-install.sh --- automated install/basic-install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index c745c502..cd85424f 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -27,12 +27,12 @@ read if [[ -f /etc/dnsmasq.d/adList.conf ]];then echo "Original Pi-hole detected. Initiating sub space transport..." sudo mkdir -p /etc/pihole/original/ - mv /etc/dnsmasq.d/adList.conf /etc/pihole/original/adList.conf.$(date "+%Y-%m-%d") - mv /etc/dnsmasq.conf /etc/pihole/original/dnsmasq.conf.$(date "+%Y-%m-%d") - mv /etc/resolv.conf /etc/pihole/original/resolv.conf.$(date "+%Y-%m-%d") - mv /etc/lighttpd/lighttpd.conf /etc/pihole/original/lighttpd.conf.$(date "+%Y-%m-%d") - mv /var/www/pihole/index.html /etc/pihole/original/index.html.$(date "+%Y-%m-%d") - mv /usr/local/bin/gravity.sh /etc/pihole/original/gravity.sh.$(date "+%Y-%m-%d") + sudo 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") + sudo 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") + sudo 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") else : fi From d15a085dd0b068f5b8d45a37c6f451e2a35c41df Mon Sep 17 00:00:00 2001 From: mospaeda Date: Fri, 18 Sep 2015 00:20:50 +0200 Subject: [PATCH 2/9] Update basic-install.sh --- automated install/basic-install.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index cd85424f..028b3dfa 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -8,6 +8,8 @@ # # Or run the commands below in order +pihole_gitsource=https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/ + clear echo " _____ _ _ _ " echo " | __ (_) | | | | " @@ -59,14 +61,14 @@ echo "Backing up original config files and downloading Pi-hole ones..." sudo mv /etc/dnsmasq.conf /etc/dnsmasq.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 curl -o /etc/dnsmasq.conf "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/dnsmasq.conf" -sudo curl -o /etc/lighttpd/lighttpd.conf "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/lighttpd.conf" +sudo curl -o /etc/dnsmasq.conf $pihole_gitsource./advanced/dnsmasq.conf +sudo curl -o /etc/lighttpd/lighttpd.conf $pihole_gitsource./advanced/lighttpd.conf sudo mkdir /var/www/pihole -sudo curl -o /var/www/pihole/index.html "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/index.html" +sudo curl -o /var/www/pihole/index.html $pihole_gitsource./advanced/index.html echo "Locating the Pi-hole..." -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 "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/Scripts/chronometer.sh" +sudo curl -o /usr/local/bin/gravity.sh $pihole_gitsource./gravity.sh +sudo curl -o /usr/local/bin/chronometer.sh $pihole_gitsource./advanced/Scripts/chronometer.sh sudo chmod 755 /usr/local/bin/gravity.sh sudo chmod 755 /usr/local/bin/chronometer.sh From 2d91a7a3c47a60f0726c33ee12987a29132887c7 Mon Sep 17 00:00:00 2001 From: mospaeda Date: Fri, 18 Sep 2015 00:22:21 +0200 Subject: [PATCH 3/9] Update basic-install.sh --- automated install/basic-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 028b3dfa..478a1abf 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -8,7 +8,7 @@ # # Or run the commands below in order -pihole_gitsource=https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/ +pihole_gitsource="https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/" clear echo " _____ _ _ _ " From 2b4500363b6c32601da2446e39d7b67e6d13546a Mon Sep 17 00:00:00 2001 From: mospaeda Date: Fri, 18 Sep 2015 00:31:17 +0200 Subject: [PATCH 4/9] Update basic-install.sh --- automated install/basic-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 478a1abf..f00a19af 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -8,7 +8,6 @@ # # Or run the commands below in order -pihole_gitsource="https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/" clear echo " _____ _ _ _ " @@ -26,6 +25,8 @@ echo " Press Enter when ready " echo " " read +pihole_gitsource="https://raw.githubusercontent.com/mospaeda/pi-hole/master/" + if [[ -f /etc/dnsmasq.d/adList.conf ]];then echo "Original Pi-hole detected. Initiating sub space transport..." sudo mkdir -p /etc/pihole/original/ From 6fc798ebe489c45bf6b9b4922c0744ce537e6cbf Mon Sep 17 00:00:00 2001 From: mospaeda Date: Fri, 18 Sep 2015 00:40:21 +0200 Subject: [PATCH 5/9] Update basic-install.sh --- automated install/basic-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index f00a19af..6d4ddd16 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -23,6 +23,7 @@ echo "Set a static IP before running this!" echo " " echo " Press Enter when ready " echo " " +echo " totootototo" read pihole_gitsource="https://raw.githubusercontent.com/mospaeda/pi-hole/master/" From 11fcfc4bf58a5701a733bd82c775bc9d28edaa68 Mon Sep 17 00:00:00 2001 From: mospaeda Date: Tue, 22 Sep 2015 22:10:33 +0200 Subject: [PATCH 6/9] Update basic-install.sh --- automated install/basic-install.sh | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 6d4ddd16..559dde85 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -8,7 +8,6 @@ # # Or run the commands below in order - clear echo " _____ _ _ _ " echo " | __ (_) | | | | " @@ -23,20 +22,17 @@ echo "Set a static IP before running this!" echo " " echo " Press Enter when ready " echo " " -echo " totootototo" read -pihole_gitsource="https://raw.githubusercontent.com/mospaeda/pi-hole/master/" - if [[ -f /etc/dnsmasq.d/adList.conf ]];then echo "Original Pi-hole detected. Initiating sub space transport..." sudo mkdir -p /etc/pihole/original/ - sudo 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") - sudo 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") - sudo 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 /etc/dnsmasq.d/adList.conf /etc/pihole/original/adList.conf.$(date "+%Y-%m-%d") + mv /etc/dnsmasq.conf /etc/pihole/original/dnsmasq.conf.$(date "+%Y-%m-%d") + mv /etc/resolv.conf /etc/pihole/original/resolv.conf.$(date "+%Y-%m-%d") + mv /etc/lighttpd/lighttpd.conf /etc/pihole/original/lighttpd.conf.$(date "+%Y-%m-%d") + mv /var/www/pihole/index.html /etc/pihole/original/index.html.$(date "+%Y-%m-%d") + mv /usr/local/bin/gravity.sh /etc/pihole/original/gravity.sh.$(date "+%Y-%m-%d") else : fi @@ -45,6 +41,9 @@ echo "Updating the Pi..." sudo apt-get update sudo apt-get -y upgrade +echo "Installing tools..." +sudo apt-get -y install bc + echo "Installing DNS..." sudo apt-get -y install dnsmasq 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/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.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/lighttpd/lighttpd.conf $pihole_gitsource./advanced/lighttpd.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 "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/lighttpd.conf" 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..." -sudo curl -o /usr/local/bin/gravity.sh $pihole_gitsource./gravity.sh -sudo curl -o /usr/local/bin/chronometer.sh $pihole_gitsource./advanced/Scripts/chronometer.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 "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/chronometer.sh From 96bc557e21111cc0d9ea660e40e25b42fdcd1027 Mon Sep 17 00:00:00 2001 From: mospaeda Date: Tue, 22 Sep 2015 22:11:30 +0200 Subject: [PATCH 7/9] Update basic-install.sh --- automated install/basic-install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 559dde85..bc9ed38d 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -27,12 +27,12 @@ read if [[ -f /etc/dnsmasq.d/adList.conf ]];then echo "Original Pi-hole detected. Initiating sub space transport..." sudo mkdir -p /etc/pihole/original/ - mv /etc/dnsmasq.d/adList.conf /etc/pihole/original/adList.conf.$(date "+%Y-%m-%d") - mv /etc/dnsmasq.conf /etc/pihole/original/dnsmasq.conf.$(date "+%Y-%m-%d") - mv /etc/resolv.conf /etc/pihole/original/resolv.conf.$(date "+%Y-%m-%d") - mv /etc/lighttpd/lighttpd.conf /etc/pihole/original/lighttpd.conf.$(date "+%Y-%m-%d") - mv /var/www/pihole/index.html /etc/pihole/original/index.html.$(date "+%Y-%m-%d") - mv /usr/local/bin/gravity.sh /etc/pihole/original/gravity.sh.$(date "+%Y-%m-%d") + sudo 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") + sudo 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") + sudo 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") else : fi From 56d4b7b0f7f0895e0fc36671aa510126c54ee595 Mon Sep 17 00:00:00 2001 From: mospaeda Date: Tue, 22 Sep 2015 22:13:16 +0200 Subject: [PATCH 8/9] Update basic-install.sh --- automated install/basic-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index bc9ed38d..e0888848 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -43,6 +43,8 @@ sudo apt-get -y upgrade echo "Installing tools..." sudo apt-get -y install bc +sudo apt-get -y install toilet + echo "Installing DNS..." sudo apt-get -y install dnsmasq From 7b49677d24b51f20af067975019581aa8501c482 Mon Sep 17 00:00:00 2001 From: mospaeda Date: Tue, 22 Sep 2015 22:38:25 +0200 Subject: [PATCH 9/9] add install for bc and toilet tools these tools are needed later by chronometer.sh --- automated install/basic-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index e0888848..9a82f0c2 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -45,7 +45,6 @@ echo "Installing tools..." sudo apt-get -y install bc sudo apt-get -y install toilet - echo "Installing DNS..." sudo apt-get -y install dnsmasq sudo update-rc.d dnsmasq enable