Subversion Repositories ALCASAR

Rev

Rev 842 | Rev 854 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 842 Rev 852
Line 1... Line 1...
1
#/bin/bash
1
#/bin/bash
2
# $Id: alcasar-bl.sh 842 2012-03-19 21:26:52Z richard $
2
# $Id: alcasar-bl.sh 852 2012-04-09 13:26:51Z richard $
3
 
3
 
4
# alcasar-bl.sh
4
# alcasar-bl.sh
5
# by Franck BOUIJOUX and Richard REY
5
# by Franck BOUIJOUX and Richard REY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 77... Line 77...
77
	for ENABLE_CATEGORIE in `cat $BL_CATEGORIES_ENABLED` # on affecte les catégories à dansguardian et dnsmasq
77
	for ENABLE_CATEGORIE in `cat $BL_CATEGORIES_ENABLED` # on affecte les catégories à dansguardian et dnsmasq
78
	do
78
	do
79
		$SED "/\/$ENABLE_CATEGORIE$/d" $BL_CATEGORIES
79
		$SED "/\/$ENABLE_CATEGORIE$/d" $BL_CATEGORIES
80
		$SED "1i\/etc\/dansguardian\/lists\/blacklists\/$ENABLE_CATEGORIE" $BL_CATEGORIES
80
		$SED "1i\/etc\/dansguardian\/lists\/blacklists\/$ENABLE_CATEGORIE" $BL_CATEGORIES
81
		ln -s $DIR_DNS_FILTER_AVAILABLE/$ENABLE_CATEGORIE.conf $DIR_DNS_FILTER_ENABLED/$ENABLE_CATEGORIE
81
		ln -s $DIR_DNS_FILTER_AVAILABLE/$ENABLE_CATEGORIE.conf $DIR_DNS_FILTER_ENABLED/$ENABLE_CATEGORIE
82
		# echo ".Include<$DIR_DANSGUARDIAN/blacklists/$ENABLE_CATEGORIES/domains>" >> $DIR_DANSGUARDIAN/bannedsitelist  # dansguardian ne s'occupe plus des noms de domaine
82
		echo ".Include<$DIR_DG_BL/$ENABLE_CATEGORIE/domains>" >> $DIR_DANSGUARDIAN/bannedsitelist  # dansguardian s'occupe du contournement par proxy http ;-)
83
		echo ".Include<$DIR_DG_BL/$ENABLE_CATEGORIE/urls>" >> $DIR_DG/bannedurllist
83
		echo ".Include<$DIR_DG_BL/$ENABLE_CATEGORIE/urls>" >> $DIR_DG/bannedurllist
84
	done
84
	done
85
	sort -k2n $BL_CATEGORIES > $FILE_tmp
85
	sort -k2n $BL_CATEGORIES > $FILE_tmp
86
	mv $FILE_tmp $BL_CATEGORIES
86
	mv $FILE_tmp $BL_CATEGORIES
87
}
87
}