Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to youtube.sh #140

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion youtube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ wait
# check to see if gawk is installed. if not it will install it
dpkg -l | grep -qw gawk || sudo apt-get install gawk -y

# check to see if sqlite is installed. if not it will install it
dpkg -l | grep -qw sqlite || sudo apt-get install sqlite -y

# remove the domains from the ignore.list
while read line ; do sed -i "/.*$line.*/d" $repoDir/youtubelist.txt ; done < $repoDir/ignore.list
while read line ; do sed -i "/.*$line.*/d" $repoDir/black.list ; done < $repoDir/ignore.list
Expand All @@ -44,7 +47,7 @@ wait
gawk -i inplace '!a[$0]++' $blacklist

# this in case you have an old blocked domain the the database
while read ignoredDns ; do /usr/bin/sqlite3 /etc/pihole/gravity.db "delete from domainlist where domain like '%$ignoredDns%' " ; done < ignore.list
while read ignoredDns ; do /usr/bin/sqlite3 /etc/pihole/gravity.db "delete from domainlist where domain like '%$ignoredDns%' " ; done < $repoDir/ignore.list

## adding it to the blacklist in Pihole V5
# only 200 Domains at once
Expand Down