Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
spam [2016/01/18 11:55]
zagi [HOSTS adblocker]
spam [2016/01/18 12:43]
zagi [HOSTS adblocker]
Line 37: Line 37:
 # 6. Delete any comments on lines # 6. Delete any comments on lines
 # 7. Clean up leftover trailing blanks # 7. Clean up leftover trailing blanks
 +# 8. We whitelist hosts j.mp
 +#
 # Pass all this through sort with the unique flag to remove duplicates and save the result # Pass all this through sort with the unique flag to remove duplicates and save the result
 echo "Parsing, cleaning, de-duplicating, sorting..." echo "Parsing, cleaning, de-duplicating, sorting..."
Line 44: Line 46:
 # #
 # IPv6 ready # IPv6 ready
-sed -e 's/\r//' -e '/^127.0.0.1\|^0.0.0.0\|^::1/!d' -e 's/\(.*\)/\L\1/' -e '/localhost/d' -e 's/127.0.0.1/::1/' -e 's/0.0.0.0/::1/' -e 's/ \+/\t/' -e 's/#.*$//' -e 's/[ \t]*$//' < $temphosts1 | sort -u > $temphosts2+sed -e 's/\r//' -e '/^127.0.0.1\|^0.0.0.0\|^::1/!d' -e 's/\(.*\)/\L\1/' -e '/localhost/d' -e 's/127.0.0.1/::1/' -e 's/0.0.0.0/::1/' -e 's/ \+/\t/' -e 's/#.*$//' -e 's/[ \t]*$//' < $temphosts1 | sort -u | grep -v $'\tj\.mp' > $temphosts2
  
 # Combine system hosts with adblocks # Combine system hosts with adblocks
Line 62: Line 64:
  
 # *buntu style # *buntu style
-#/etc/init.d/network-manager  restart+/etc/init.d/network-manager  restart
  
  
spam.txt ยท Last modified: 2016/08/05 09:00 by zagi
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready