Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ### Custom user script
- ### Called after router started and network is ready
- ### Example - load ipset modules
- #modprobe ip_set
- #modprobe ip_set_hash_ip
- #modprobe ip_set_hash_net
- #modprobe ip_set_bitmap_ip
- #modprobe ip_set_list_set
- #modprobe xt_set
- touch /tmp/hosts
- sleep 7
- URLS="https://schakal.ru/hosts/alive_hosts_mail_fb.txt"
- logger "Updating HOSTS-file..." && wget -T 10 -qO- $URLS | sed 's/\t/ /g' | sed 's/\r//' | sed 's/0.0.0.0/127.0.0.1/g' | grep "^127.0.0.1" | cut -d " " -f 1,2 | tr A-Z a-z | sort | uniq > /tmp/hosts && logger "HOSTS-file has been successfully updated."
- sed -i '1d' /tmp/hosts
- sed -i '/localhost/d' /tmp/hosts
- sed -i '/127.0.0.1 l-stat.livejournal.net/d' /tmp/hosts
- sed -i '/127.0.0.1 clck.yandex./d' /tmp/hosts
- sed -i '/127.0.0.1 adv.gpm-digital.com/d' /tmp/hosts
- sed -i '/127.0.0.1 c.allegrostatic.pl/d' /tmp/hosts
- killall -SIGHUP dnsmasq
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement