Subversion Repositories ALCASAR

Rev

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

Rev 2919 Rev 3099
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
 
2
 
3
# $Id: alcasar-bl.sh 2919 2021-02-20 19:14:53Z rexy $
3
# $Id: alcasar-bl.sh 3099 2022-12-28 11:30:30Z rexy $
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 269... Line 269...
269
					mv $FILE_tmp $DIR_DNS_BL/$DOMAIN.conf
269
					mv $FILE_tmp $DIR_DNS_BL/$DOMAIN.conf
270
					mv $FILE_ip_tmp $DIR_IP_BL/$DOMAIN
270
					mv $FILE_ip_tmp $DIR_IP_BL/$DOMAIN
271
				else
271
				else
272
					# adapt to the unbound syntax for the whitelist
272
					# adapt to the unbound syntax for the whitelist
273
					$SED "s?.*?local-zone: & transparent?g" $FILE_tmp
273
					$SED "s?.*?local-zone: & transparent?g" $FILE_tmp
-
 
274
					$SED "p; s? transparent? ipset?g" $FILE_tmp # duplicate lines to enable ipset module
274
					mv $FILE_tmp $DIR_DNS_WL/$DOMAIN.conf
275
					mv $FILE_tmp $DIR_DNS_WL/$DOMAIN.conf
275
				fi
276
				fi
276
			done
277
			done
277
		done
278
		done
278
		echo
279
		echo
Line 360... Line 361...
360
		chmod 660 $DIR_DNS_BL/* $DIR_DNS_WL/* $DIR_IP_BL/* $DIR_IP_WL/*
361
		chmod 660 $DIR_DNS_BL/* $DIR_DNS_WL/* $DIR_IP_BL/* $DIR_IP_WL/*
361
		if [ "$PARENT_SCRIPT" != "alcasar-conf.sh" ] # don't launch on install stage
362
		if [ "$PARENT_SCRIPT" != "alcasar-conf.sh" ] # don't launch on install stage
362
		then
363
		then
363
			/usr/bin/systemctl restart unbound-blacklist
364
			/usr/bin/systemctl restart unbound-blacklist
364
			/usr/bin/systemctl restart unbound-whitelist
365
			/usr/bin/systemctl restart unbound-whitelist
365
			/usr/bin/systemctl restart dnsmasq-whitelist
-
 
366
			/usr/bin/systemctl restart e2guardian
366
			/usr/bin/systemctl restart e2guardian
367
			/usr/local/bin/alcasar-iptables.sh
367
			/usr/local/bin/alcasar-iptables.sh
368
		fi
368
		fi
369
		;;
369
		;;
370
	*)
370
	*)