Skip to content

Instantly share code, notes, and snippets.

@FlandreDaisuki
Created February 2, 2018 12:54
Show Gist options
  • Save FlandreDaisuki/98e15277d3835df3deb91d973d139020 to your computer and use it in GitHub Desktop.
Save FlandreDaisuki/98e15277d3835df3deb91d973d139020 to your computer and use it in GitHub Desktop.
cron with root
#!/bin/sh
USERNAME='flandre'
cd /root && \
wget https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt && \
cat localhosts hosts.txt > /etc/hosts && \
rm hosts.txt* && \
sudo -u $USERNAME notify-send -t 30000 '/etc/hosts update'
127.0.0.1 localhost
127.0.1.1 $HOSTNAME
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment