Created
February 2, 2018 12:54
-
-
Save FlandreDaisuki/98e15277d3835df3deb91d973d139020 to your computer and use it in GitHub Desktop.
cron with root
This file contains hidden or 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/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' |
This file contains hidden or 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
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