Subversion Repositories ALCASAR

Rev

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

Rev 2223 Rev 2434
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
 
2
 
3
# $Id: alcasar-bl.sh 2223 2017-05-14 14:38:01Z tom.houdayer $
3
# $Id: alcasar-bl.sh 2434 2017-11-06 16:41:44Z franck $
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 306... Line 306...
306
		# for DG
306
		# for DG
307
		cat_choice
307
		cat_choice
308
		#  for dnsmasq (rehabited domain names)
308
		#  for dnsmasq (rehabited domain names)
309
		if [ `wc -w $DIR_DG/exceptionsitelist|cut -d " " -f1` != "0" ]
309
		if [ `wc -w $DIR_DG/exceptionsitelist|cut -d " " -f1` != "0" ]
310
		then
310
		then
-
 
311
			rm -f $DIR_DNS_BL_ENABLED/authorized-ossi-bl $DIR_DNS_BL/authorized-ossi-bl.conf
-
 
312
			touch $DIR_DNS_BL/authorized-ossi-bl.conf
311
			for i in `cat $DIR_DG/exceptionsitelist`
313
			for i in `cat $DIR_DG/exceptionsitelist`
312
			do
314
			do
313
				$SED "/$i/d" $DIR_DNS_BL/*
315
				$SED "/$i/d" $DIR_DNS_BL/*
-
 
316
				echo "server=/$i/#" >> $DIR_DNS_BL/authorized-ossi-bl.conf
314
			done
317
			done
-
 
318
			ln -s $DIR_DNS_BL/authorized-ossi-bl.conf $DIR_DNS_BL_ENABLED/authorized-ossi-bl
315
		fi
319
		fi
316
		# adapt OSSI BL & WL custom files
320
		# adapt OSSI BL & WL custom files
317
		for dir in $DIR_DNS_BL_ENABLED $DIR_DNS_WL_ENABLED $DIR_IP_BL_ENABLED $DIR_IP_WL_ENBALED $DIR_DNS_BL $DIR_DNS_WL $DIR_IP_BL $DIr_IP_WL
321
		for dir in $DIR_DNS_BL_ENABLED $DIR_DNS_WL_ENABLED $DIR_IP_BL_ENABLED $DIR_IP_WL_ENBALED $DIR_DNS_BL $DIR_DNS_WL $DIR_IP_BL $DIr_IP_WL
318
		do
322
		do
319
			rm -f $dir/ossi*
323
			rm -f $dir/ossi*