Created
May 29, 2013 12:25
-
-
Save rodrigobaron/5669900 to your computer and use it in GitHub Desktop.
Block ads .. banner and another shits ..
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
# -*- coding: UTF-8 -*- # ################################################### | |
# # | |
# mvps_hosts - Sync MVPS HOSTS # | |
# # | |
# DESCRIPTION # | |
# The Sync MVPS HOSTS backup your hosts file ... download the mvps hosts # | |
# and join into the new hosts file... if you need add or remove a custom host # | |
# change the older file "/etc/hosts_bak" # | |
# # | |
# REQUERIMENT # | |
# - wget # | |
# # | |
# AUTHOR # | |
# Rodrigo Baron aka saage # | |
# # | |
############################################################################### | |
#!/bin/bash | |
orig="/etc/hosts" | |
older="/etc/hosts_bak" | |
new="/etc/hosts_mvps" | |
if [ ! -b "$older" ]; | |
then | |
mv "$orig" "$older" | |
fi | |
cat "$older" > "$orig" | |
if [ ! -b "$new" ]; | |
then | |
rm "$new" | |
fi | |
wget -c "http://winhelp2002.mvps.org/hosts.txt" -O "$new" | |
cat "$new" >> "$orig" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment