From b36257683a93424342c582c5b7e36dcffc5c1a03 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Mon, 19 Oct 2015 09:36:29 +0100 Subject: Correct script to block/unblock facebook --- bin/facebook | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3