Subversion Repositories ALCASAR

Rev

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

Rev 1059 Rev 1060
Line 1... Line 1...
1
#/bin/bash
1
#/bin/bash
2
 
2
 
3
# $Id: alcasar-bl.sh 1059 2013-03-27 22:20:10Z richard $
3
# $Id: alcasar-bl.sh 1060 2013-03-31 18:10:30Z 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 61... Line 61...
61
	sort +0.0 -0.2 $WL_CATEGORIES -o $FILE_tmp
61
	sort +0.0 -0.2 $WL_CATEGORIES -o $FILE_tmp
62
	mv $FILE_tmp $WL_CATEGORIES
62
	mv $FILE_tmp $WL_CATEGORIES
63
}
63
}
64
function bl_enable (){
64
function bl_enable (){
65
	$SED "s/^reportinglevel =.*/reportinglevel = 3/g" /etc/dansguardian/dansguardian.conf
65
	$SED "s/^reportinglevel =.*/reportinglevel = 3/g" /etc/dansguardian/dansguardian.conf
66
	if [ "$PARENT_SCRIPT" != "/usr/local/bin/alcasar-conf.sh" ] # don't launch on install stage
66
	if [ "$PARENT_SCRIPT" != "alcasar-conf.sh" ] # don't launch on install stage
67
	then
67
	then
68
		service dansguardian restart
68
		service dansguardian restart
69
		service dnsmasq restart
69
		service dnsmasq restart
70
		/usr/local/bin/alcasar-iptables.sh
70
		/usr/local/bin/alcasar-iptables.sh
71
	fi
71
	fi
72
}
72
}
73
function bl_disable (){
73
function bl_disable (){
74
	rm -rf $DIR_DNS_BL_ENABLED/*
74
	rm -rf $DIR_DNS_BL_ENABLED/*
75
	$SED "s/^reportinglevel =.*/reportinglevel = -1/g" /etc/dansguardian/dansguardian.conf
75
	$SED "s/^reportinglevel =.*/reportinglevel = -1/g" /etc/dansguardian/dansguardian.conf
76
	if [ "$PARENT_SCRIPT" != "/usr/local/bin/alcasar-conf.sh" ] # don't launch on install stage
76
	if [ "$PARENT_SCRIPT" != "alcasar-conf.sh" ] # don't launch on install stage
77
	then
77
	then
78
		service dansguardian restart
78
		service dansguardian restart
79
		service dnsmasq restart
79
		service dnsmasq restart
80
		/usr/local/bin/alcasar-iptables.sh
80
		/usr/local/bin/alcasar-iptables.sh
81
	fi
81
	fi