Subversion Repositories ALCASAR

Rev

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

Rev 1056 Rev 1060
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-watchdog.sh 1056 2013-03-26 21:46:36Z stephane $
2
# $Id: alcasar-watchdog.sh 1060 2013-03-31 18:10:30Z richard $
3
 
3
 
4
# alcasar-watchdog.sh
4
# alcasar-watchdog.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 85... Line 85...
85
		echo "Internet access is OK for now"
85
		echo "Internet access is OK for now"
86
		net_pb=`cat /etc/dnsmasq.conf|grep "address=/#/"|wc -l`
86
		net_pb=`cat /etc/dnsmasq.conf|grep "address=/#/"|wc -l`
87
		if [ $net_pb != "0" ]
87
		if [ $net_pb != "0" ]
88
			then
88
			then
89
			/bin/sed -i "s?^\$network_pb.*?\$network_pb = False;?g" $Index_Page
89
			/bin/sed -i "s?^\$network_pb.*?\$network_pb = False;?g" $Index_Page
90
			/bin/sed -i "s?^address=\/#\/.*?conf-dir=/usr/local/etc/alcasar-dnsfilter-enabled?g" /etc/dnsmasq-blackhole.conf
90
			/bin/sed -i "s?^address=\/#\/.*?conf-dir=/usr/local/share/dnsmasq-bl-enabled?g" /etc/dnsmasq-blackhole.conf
91
			/bin/sed -i "/^address=/d" /etc/dnsmasq.conf
91
			/bin/sed -i "/^address=/d" /etc/dnsmasq.conf
92
			/etc/init.d/dnsmasq restart
92
			/etc/init.d/dnsmasq restart
93
		fi
93
		fi
94
	fi
94
	fi
95
}
95
}