Subversion Repositories ALCASAR

Rev

Rev 1042 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1042 Rev 1053
Line 1... Line 1...
1
#/bin/bash
1
#/bin/bash
2
 
2
 
3
# $Id: alcasar-bl.sh 1042 2013-03-10 17:56:30Z richard $
3
# $Id: alcasar-bl.sh 1053 2013-03-24 22:52:52Z richard $
4
 
4
 
5
# alcasar-bl.sh
5
# alcasar-bl.sh
6
# by Franck BOUIJOUX and Richard REY
6
# by Franck BOUIJOUX and Richard REY
7
# This script is distributed under the Gnu General Public License (GPL)
7
# This script is distributed under the Gnu General Public License (GPL)
8
 
8
 
Line 42... Line 42...
42
	# process the file $BL_CATEGORIES with the choice of categories 
42
	# process the file $BL_CATEGORIES with the choice of categories 
43
	for ENABLE_CATEGORIE in `cat $BL_CATEGORIES_ENABLED` 
43
	for ENABLE_CATEGORIE in `cat $BL_CATEGORIES_ENABLED` 
44
	do
44
	do
45
		$SED "/\/$ENABLE_CATEGORIE$/d" $BL_CATEGORIES 
45
		$SED "/\/$ENABLE_CATEGORIE$/d" $BL_CATEGORIES 
46
		$SED "1i\/etc\/dansguardian\/lists\/blacklists\/$ENABLE_CATEGORIE" $BL_CATEGORIES
46
		$SED "1i\/etc\/dansguardian\/lists\/blacklists\/$ENABLE_CATEGORIE" $BL_CATEGORIES
47
		ln -s $DIR_DNS_BL/$ENABLE_CATEGORIE.conf $DIR_DNS_BL_ENABLED/$ENABLE_CATEGORIE
47
		ln -s $DIR_DNS_BL/$ENABLE_CATEGORIE $DIR_DNS_BL_ENABLED/$ENABLE_CATEGORIE
48
		ln -s $DIR_IP_BL/$ENABLE_CATEGORIE $DIR_IP_BL_ENABLED/$ENABLE_CATEGORIE
48
		ln -s $DIR_IP_BL/$ENABLE_CATEGORIE $DIR_IP_BL_ENABLED/$ENABLE_CATEGORIE
49
		echo ".Include<$DIR_DG_BL/$ENABLE_CATEGORIE/domains>" >> $DIR_DG/bannedsitelist  # we let DG filters domain in order to prevent bypass by proxy http vpn ;-)
49
		echo ".Include<$DIR_DG_BL/$ENABLE_CATEGORIE/domains>" >> $DIR_DG/bannedsitelist  # we let DG filters domain in order to prevent bypass by proxy http vpn ;-)
50
		echo ".Include<$DIR_DG_BL/$ENABLE_CATEGORIE/urls>" >> $DIR_DG/bannedurllist
50
		echo ".Include<$DIR_DG_BL/$ENABLE_CATEGORIE/urls>" >> $DIR_DG/bannedurllist
51
	done
51
	done
52
	sort +0.0 -0.2 $BL_CATEGORIES -o $FILE_tmp
52
	sort +0.0 -0.2 $BL_CATEGORIES -o $FILE_tmp