From eb4d2382cd46ddc6864b009abdb8cb7375a6f201 Mon Sep 17 00:00:00 2001 From: jacobsalmela Date: Sun, 8 Feb 2015 17:06:43 -0600 Subject: [PATCH] oops im a n00b --- gravity-adv.sh | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/gravity-adv.sh b/gravity-adv.sh index 5b1f76d..1c23453 100755 --- a/gravity-adv.sh +++ b/gravity-adv.sh @@ -29,29 +29,9 @@ echo "Getting someone who cares ad list..." curl -s http://someonewhocares.org/hosts/hosts | grep -v "#" | sed '/^$/d' | sed 's/\ /\\ /g' | awk '{print $2}' >> /tmp/matter.txt # Sort the aggregated results and remove any duplicates -#<<<<<<< Updated upstream echo "removing duplicates and formatting to address=//"$piholeIP cat /tmp/matter.txt | sort | uniq | sed '/^$/d' | awk -v "IP=$piholeIP" '{sub(/\r$/,""); print "address=/"$0"/"IP}' > /tmp/andLight.txt mv /tmp/andLight.txt $eventHorizion -======= -echo "Sorting and removing duplicates..." -cat /tmp/matter.txt | sort | uniq | sed '/^$/d' > /tmp/andLight.txt - -# Read the file, prepend "address=/", and append the IP of the Raspberry Pi -# This creates a correctly-formatted config file -while read fermion -do - boson=$(echo "$fermion" | tr -d '\r') - # WHITELSISTING - case $boson in - # Change these domains below to whitelist a site (will show ads) - jacobsalmela.com) echo "--------WHITELISTED $boson";; - lifehacker.com) echo "--------WHITELISTED $boson";; - *) echo "address=/$boson/$piholeIP" >> $eventHorizion; - echo "Added $boson...";; - esac -done >>>>>> Stashed changes # Restart DNS -service dnsmasq restart +service dnsmasq restart \ No newline at end of file