Subversion Repositories ALCASAR

Rev

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

Rev 316 Rev 323
Line 1... Line 1...
1
#/bin/sh
1
#/bin/sh
2
# $Id: alcasar-bl.sh 316 2010-11-14 22:25:53Z richard $
2
# $Id: alcasar-bl.sh 323 2010-11-16 22:48:34Z richard $
3
 
3
 
4
# Script de gestion de la BL pour le filtrage de domaine (via dnsmasq) et d'URL (via dansguardian)
4
# Script de gestion de la BL pour le filtrage de domaine (via dnsmasq) et d'URL (via dansguardian)
5
# By 3abtux & rexy
5
# By 3abtux & rexy
6
 
6
 
7
DIR_tmp="/tmp/blacklists"
7
DIR_tmp="/tmp/blacklists"
Line 92... Line 92...
92
		;;
92
		;;
93
	# activation du filtrage
93
	# activation du filtrage
94
	-on)	
94
	-on)	
95
		cat_choice
95
		cat_choice
96
		$SED "s/^reportinglevel =.*/reportinglevel = 3/g" /etc/dansguardian/dansguardian.conf
96
		$SED "s/^reportinglevel =.*/reportinglevel = 3/g" /etc/dansguardian/dansguardian.conf
97
		if [ ! $PARENT_SCRIPT -eq "alcasar.sh" ] # on ne relance pas les processus d'une install
97
		if [ "$PARENT_SCRIPT" != "/usr/local/bin/alcasar-conf.sh" ] # on ne relance pas les processus d'une install
98
		then
98
		then
99
		service dansguardian restart
99
		service dansguardian restart
100
		service dnsmasq restart
100
		service dnsmasq restart
101
		fi
101
		fi
102
		;;
102
		;;
103
	# d├ęsactivation du filtrage
103
	# d├ęsactivation du filtrage
104
	-off)
104
	-off)
105
		rm -rf $DIR_DNS_FILTER_ENABLED/*
105
		rm -rf $DIR_DNS_FILTER_ENABLED/*
106
		$SED "s/^reportinglevel =.*/reportinglevel = -1/g" /etc/dansguardian/dansguardian.conf
106
		$SED "s/^reportinglevel =.*/reportinglevel = -1/g" /etc/dansguardian/dansguardian.conf
107
		if [ ! $PARENT_SCRIPT -eq "alcasar.sh" ] # on ne relance pas les processus lors d'une install
107
		if [ "$PARENT_SCRIPT" != "/usr/local/bin/alcasar-conf.sh" ] # on ne relance pas les processus lors d'une install
108
		then
108
		then
109
		service dansguardian restart
109
		service dansguardian restart
110
		service dnsmasq restart
110
		service dnsmasq restart
111
		fi
111
		fi
112
		;;
112
		;;