Subversion Repositories ALCASAR

Rev

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

Rev 1339 Rev 1341
Line 1... Line 1...
1
#/bin/bash
1
#/bin/bash
2
 
2
 
3
# $Id: alcasar-bl.sh 1339 2014-05-05 12:55:57Z richard $
3
# $Id: alcasar-bl.sh 1341 2014-05-06 08:07:32Z 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 143... Line 143...
143
		;;		
143
		;;		
144
	# Adapt Toulouse BL to ALCASAR architecture (dnsmasq + DG + iptables)
144
	# Adapt Toulouse BL to ALCASAR architecture (dnsmasq + DG + iptables)
145
	-adapt | --adapt)
145
	-adapt | --adapt)
146
		echo -n "Toulouse BlackList migration process. Please wait : "
146
		echo -n "Toulouse BlackList migration process. Please wait : "
147
		# Saving ossi category
147
		# Saving ossi category
148
		cp $DIR_IP_BL/ossi $DIR_tmp
148
		cp $DIR_IP_BL/ossi $DIR_tmp/ossi-ip
149
		if [ -f $DIR_tmp/blacklists.tar.gz ]
149
		if [ -f $DIR_tmp/blacklists.tar.gz ]
150
		then
150
		then
151
			[ -d $DIR_DG_BL/ossi ] && mv -f $DIR_DG_BL/ossi $DIR_tmp
151
			[ -d $DIR_DG_BL/ossi ] && mv -f $DIR_DG_BL/ossi $DIR_tmp
152
			rm -rf $DIR_DG_BL
152
			rm -rf $DIR_DG_BL
153
			mkdir $DIR_DG_BL
153
			mkdir $DIR_DG_BL
Line 217... Line 217...
217
				fi
217
				fi
218
			done
218
			done
219
		done
219
		done
220
		rm -f $FILE_tmp $FILE_ip_tmp
220
		rm -f $FILE_tmp $FILE_ip_tmp
221
		# Restoring ossi category
221
		# Restoring ossi category
222
		mv $DIR_tmp/ossi $DIR_IP_BL
222
		mv $DIR_tmp/ossi-ip $DIR_IP_BL/ossi
223
		rm -rf $DIR_tmp
223
		rm -rf $DIR_tmp
224
		echo
224
		echo
225
		;;
225
		;;
226
	# reload when categories are changed 
226
	# reload when categories are changed 
227
	-reload | --reload)
227
	-reload | --reload)