[root@gateway ~]# vi allowweb.sh

Paste the below mentioned lines.

#!/bin/bash  
cd /usr/local/squidGuard/db/whitelist/  
echo -n "Plz enter the site name which you want to allow "  
read -e web1  
echo $web1  >> domains  
echo "Enter another web name or press enter "  
read -e web2  
echo $web2 >> domains  
echo "Enter another web name or press enter "  
read -e web3  
echo $web3 >> domains  
echo Plz wait  
/usr/local/bin/squidGuard -C domains  
service squid restart  
echo Web $web1, $web2 $web3 added into whitelist  
 
  
[root@gateway~]# chmod  u+x allowweb.sh  
[root@gateway ~]#./allowweb.sh  

[root@gateway1 ~]# vi delweb.sh

Paste the below mentioned lines.

#!/bin/sh  
cd /usr/local/squidGuard/db/whitelist/  
echo "Enter the site name which you to delete"  
  
read -e rep  
for file in $(grep -il "$rep" domains)  
do  
sed -e "s/$rep//ig" $file > /tmp/tempfile.tmp  
mv /tmp/tempfile.tmp $file  
done  
  
echo Plz wait...  
/usr/local/bin/squidGuard -C domains  
service squid restart  
echo Web $rep deleted from whitelist  
  
[root@gateway~]# chmod  u+x delweb.sh  
  
[root@gateway ~]#./delweb.sh  

Cheers 🙂