summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2015-10-19 09:36:29 +0100
committerUrbain Vaes <urbain@vaes.uk>2015-10-19 09:36:29 +0100
commitb36257683a93424342c582c5b7e36dcffc5c1a03 (patch)
treeabd464475cc9bf7b4467faf9af5f56cac63bc77a
parent8f1e3adb50b38744975e6a4dcfba2d8f7422435d (diff)
Correct script to block/unblock facebook
-rwxr-xr-xbin/facebook4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/facebook b/bin/facebook
index baa843f..00ecdcc 100755
--- a/bin/facebook
+++ b/bin/facebook
@@ -1,7 +1,7 @@
#! /bin/bash
line="127.0.0.1 www.facebook.com"
-if grep -q "facebook" /etc/hosts; then
- zenity --password | sudo -S bash -c "sed -i '/facebook/d' /etc/hosts"
+if grep -q "www.facebook.com" /etc/hosts; then
+ zenity --password | sudo -S bash -c "sed -i '/www.facebook.com/d' /etc/hosts"
else
zenity --password | sudo -S bash -c "echo ${line} >> /etc/hosts"
fi