Subversion Repositories ALCASAR

Rev

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

Rev 1913 Rev 1914
Line 1... Line 1...
1
#/bin/bash
1
#/bin/bash
2
 
2
 
3
# $Id: alcasar-bl.sh 1913 2016-05-29 14:44:38Z richard $
3
# $Id: alcasar-bl.sh 1914 2016-05-29 15:36:09Z 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 352... Line 352...
352
		echo 
352
		echo 
353
		;;
353
		;;
354
	# reload when categories are changed 
354
	# reload when categories are changed 
355
	-reload | --reload)
355
	-reload | --reload)
356
		# for DG
356
		# for DG
357
		chown -R dansguardian:apache $DIR_DG_BL/ossi
-
 
358
		chmod -R g+w $DIR_DG_BL/ossi
-
 
359
		cat_choice
357
		cat_choice
360
		#  for dnsmasq (rehabited domain names)
358
		#  for dnsmasq (rehabited domain names)
361
		if [ `wc -w $DIR_DG/exceptionsitelist|cut -d " " -f1` != "0" ]
359
		if [ `wc -w $DIR_DG/exceptionsitelist|cut -d " " -f1` != "0" ]
362
		then
360
		then
363
			for i in `cat $DIR_DG/exceptionsitelist`
361
			for i in `cat $DIR_DG/exceptionsitelist`
364
			do
362
			do
365
				$SED "/$i/d" $DIR_DNS_BL/*
363
				$SED "/$i/d" $DIR_DNS_BL/*
366
			done
364
			done
367
		fi
365
		fi
368
		cp -f $DIR_DG_BL/ossi/domains $DIR_DNS_BL/ossi.conf
-
 
369
		$SED "s?.*?address=/&/$PRIVATE_IP?g" $DIR_DNS_BL/ossi.conf
-
 
370
		$SED "s?.*?server=/&/$DNS1?g" $DIR_DNS_WL/ossi.conf
-
 
371
		
-
 
372
		/usr/bin/systemctl restart dnsmasq-blacklist
366
		/usr/bin/systemctl restart dnsmasq-blacklist
373
		/usr/bin/systemctl restart dnsmasq-whitelist
367
		/usr/bin/systemctl restart dnsmasq-whitelist
374
		/usr/local/bin/alcasar-iptables.sh
368
		/usr/local/bin/alcasar-iptables.sh
375
		;;
369
		;;
376
	*)
370
	*)