We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 682a6b9 commit 571b407Copy full SHA for 571b407
functions
@@ -54,9 +54,18 @@ set-wifi-macaddress() {
54
}
55
56
update-hosts() {
57
- sudo cp -f /etc/hosts /etc/hosts_bck
+ sudo 'cp' -f /etc/hosts /etc/hosts_bck
58
wget "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" -O- > /tmp/etc_hosts
59
cat ~/.hosts >> /tmp/etc_hosts
60
- sudo mv /tmp/etc_hosts /etc/hosts
+ sudo 'mv' -f /tmp/etc_hosts /etc/hosts_blocking
61
+}
62
+
63
+enable-hosts-blocking() {
64
+ sudo 'cp' -f /etc/hosts_blocking /etc/hosts
65
+ sudo dscacheutil -flushcache
66
67
68
+disable-hosts-blocking() {
69
+ sudo 'cp' -f ~/.hosts /etc/hosts
70
sudo dscacheutil -flushcache
71
0 commit comments