Created
May 10, 2020 17:05
-
-
Save tolgahanakgun/4a53b807f015aeba8ba9a0f08151574e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# download hosts file | |
wget -O /opt/adblock/hostfiles/someonewhocares.hosts https://someonewhocares.org/hosts/zero/hosts | |
wget -O /opt/adblock/hostfiles/winhelp2002.hosts http://winhelp2002.mvps.org/hosts.txt | |
wget -O /opt/adblock/hostfiles/tgccloud.hosts https://tgc.cloud/downloads/hosts.txt | |
wget -O /opt/adblock/hostfiles/stevensblack.hosts https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | |
wget -O /opt/adblock/hostfiles/hblock.hosts https://hblock.molinero.dev/hosts | |
wget -O /opt/adblock/hostfiles/spotify_x0uid_spotifyablock.hosts https://raw.githubusercontent.com/x0uid/SpotifyAdBlock/master/hosts | |
wget -O /opt/adblock/hostfiles/spotify_saminnet_spotify_adblock_script.hosts https://raw.githubusercontent.com/saminnet/spotify-adblock-script/master/block.txt | |
# remove update address from blacklist | |
sed -i '/upgrade.spotify.com/d' /opt/adblock/hostfiles/spotify_x0uid_spotifyablock.hosts | |
sed -i '/www.spotify-desktop.com/d' /opt/adblock/hostfiles/spotify_x0uid_spotifyablock.hosts | |
sed -i '/sto3-accesspoint-a88.sto3.spotify.net/d' /opt/adblock/hostfiles/spotify_x0uid_spotifyablock.hosts | |
sed -i '/upgrade.scdn.co/d' /opt/adblock/hostfiles/spotify_x0uid_spotifyablock.hosts | |
sed -i '/beta.spotify.map.fastly.net/d' /opt/adblock/hostfiles/spotify_x0uid_spotifyablock.hosts | |
sed -i '/prod.spotify.map.fastlylb.net/d' /opt/adblock/hostfiles/spotify_x0uid_spotifyablock.hosts | |
# restart the dnsmasq service for the updated hosts file | |
service dnsmasq restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment