Subversion Repositories ALCASAR

Rev

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

Rev 1777 Rev 1795
Line 1... Line 1...
1
#/bin/bash
1
#/bin/bash
2
# $Id: alcasar-conf.sh 1777 2016-01-19 21:19:18Z richard $
2
# $Id: alcasar-conf.sh 1795 2016-02-24 08:45:58Z franck $
3
 
3
 
4
# alcasar-conf.sh
4
# alcasar-conf.sh
5
# by REXY
5
# by REXY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 301... Line 301...
301
		$SED "s?^dns2.*?dns2\t\t$PRIVATE_IP?g" /etc/chilli.conf
301
		$SED "s?^dns2.*?dns2\t\t$PRIVATE_IP?g" /etc/chilli.conf
302
		$SED "s?^uamlisten.*?uamlisten\t$PRIVATE_IP?g" /etc/chilli.conf
302
		$SED "s?^uamlisten.*?uamlisten\t$PRIVATE_IP?g" /etc/chilli.conf
303
		# modify the DHCP static ip file. Reserve the second IP address for INTIF (the first one is for tun0). Keep previous entries
303
		# modify the DHCP static ip file. Reserve the second IP address for INTIF (the first one is for tun0). Keep previous entries
304
		$SED "s?^$PRIVATE_MAC.*?$PRIVATE_MAC $PRIVATE_SECOND_IP?" $DIR_ETC/alcasar-ethers
304
		$SED "s?^$PRIVATE_MAC.*?$PRIVATE_MAC $PRIVATE_SECOND_IP?" $DIR_ETC/alcasar-ethers
305
# dnsmasq
305
# dnsmasq
306
		$SED "/127.0.0.1/!s?^listen-address=.*?listen-address=$PRIVATE_IP?g" /etc/dnsmasq.conf /etc/dnsmasq-blacklist.conf /etc/dnsmasq-whitelist.conf
306
		$SED "/127.0.0.1/!s?^listen-address=.*?listen-address=$PRIVATE_IP?g" /etc/dnsmasq.conf /etc/dnsmasq-blacklist.conf /etc/dnsmasq-whitelist.conf /etc/dnsmasq-blackhole.conf
307
		for i in /etc/dnsmasq.conf /etc/dnsmasq-blacklist.conf
307
		for i in /etc/dnsmasq.conf /etc/dnsmasq-blacklist.conf
308
		do
308
		do
309
			$SED "/^server=/d" $i
309
			$SED "/^server=/d" $i
310
			echo "server=$DNS1" >> $i
310
			echo "server=$DNS1" >> $i
311
			echo "server=$DNS2" >> $i
311
			echo "server=$DNS2" >> $i