14,7 → 14,9 |
INTIF="eth1" |
PRIVATE_IP="192.168.182.1" |
tmp_file="/tmp/watchdog.txt" |
Network_Pb_Page="/var/www/html/redirect/index-network-pb.php" |
DIR_WEB="/var/www/html" |
Network_Pb_Page="$DIR_WEB/index-network-pb.php" |
Network_Deny_Page="$DIR_WEB/index-access-deny.php" |
IFS=$'\n' |
|
# Fonction appelée si un Pb de connectivité Internet |
38,7 → 40,7 |
net_pb=`cat /etc/dnsmasq.d/alcasar-dnsmasq.conf|grep "address=/#/"|wc -l` |
if [ $net_pb != "1" ] |
then |
ln -sf /var/www/html/redirect/index-network-pb.php /var/www/html/redirect/index.php |
ln -sf $Network_Pb_Page $DIR_WEB/index.php |
/bin/sed -i "s?^conf-dir=.*?address=\/#\/$PRIVATE_IP?g" /etc/dnsmasq.d/alcasar-dnsmasq.conf |
/etc/init.d/dnsmasq restart |
fi |
72,7 → 74,7 |
net_pb=`cat /etc/dnsmasq.d/alcasar-dnsmasq.conf|grep "address=/#/"|wc -l` |
if [ $net_pb -eq "1" ] |
then |
ln -sf /var/www/html/redirect/index-access-deny.php /var/www/html/redirect/index.php |
ln -sf $Network_Deny_Page $DIR_WEB/index.php |
/bin/sed -i "s?^address=\/#\/.*?conf-dir=/usr/local/etc/alcasar-dnsfilter-enabled?g" /etc/dnsmasq.d/alcasar-dnsmasq.conf |
/etc/init.d/dnsmasq restart |
fi |