Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2174 → Rev 2175

/alcasar.sh
2013,6 → 2013,7
PARENT_SCRIPT=`basename $0`
export PARENT_SCRIPT # to avoid stop&start process during the installation process
$DIR_DEST_BIN/alcasar-conf.sh --apply
$DIR_DEST_BIN/alcasar-file-clean.sh # Clean & sort conf files. Add uamallowed domains to the dns-blackhole conf
$SED "s?^INSTALL_DATE=.*?INSTALL_DATE=$DATE?g" $CONF_FILE
$SED "s?^VERSION=.*?VERSION=$VERSION?g" $CONF_FILE
fi
/scripts/alcasar-file-clean.sh
23,7 → 23,7
done
 
# remove empty lines and put rights
for file in $ALCASAR_SERVICES $ALCASAR_EXCEPTIONS $ALCASAR_IP_BLOCKED $ALCASAR_CONF $ALCASAR_UAMDOMAIN $ALCASAR_UAMALLOWED
for file in $ALCASAR_SERVICES $ALCASAR_IP_BLOCKED $ALCASAR_CONF $ALCASAR_UAMDOMAIN $ALCASAR_UAMALLOWED
do
$SED "/^$/d" $file
chown root:apache $file
30,7 → 30,7
chmod 660 $file
done
 
#update dnsmasq-blackhole for uamallowed ALCASAR_UAMDOMAIN
#update dnsmasq-blackhole with uamallowed domains ($ALCASAR_UAMDOMAIN)
#remove old configuration
sed -i '/^server=/d' /etc/dnsmasq-blackhole.conf
 
39,5 → 39,7
domain_exception="server=/$(echo $domain | cut -d'"' -f2)/#"
sed -i "/conf-file/a$domain_exception" /etc/dnsmasq-blackhole.conf
done
 
systemctl restart dnsmasq-blackhole
if [ "$PARENT_SCRIPT" != "alcasar.sh" ] # don't restart on install stage
then
systemctl restart dnsmasq-blackhole
fi
/web/acc/manager/auth_exceptions.php
88,7 → 88,9
$pointeur=fopen(DOMAIN_ALLOWED_LIST,"a");
fwrite ($pointeur, $line);
fclose ($pointeur);
exec ("sudo /usr/local/bin/alcasar-file-clean.sh");
exec ("sudo /usr/local/bin/alcasar-file-clean.sh"); # Clean & sort conf files. Add uamallowed domains to the dns-blackhole conf
exec ("sudo /usr/bin/systemctl restart dnsmasq-blackhole");
sleep 1 # be sure that dnsmasq-blackhole is restarted before killing tun0 !
exec ("sudo /usr/bin/systemctl restart chilli");
}
}
122,6 → 124,9
}
fclose($pointeur);
}
exec ("sudo /usr/local/bin/alcasar-file-clean.sh");
exec ("sudo /usr/bin/systemctl restart dnsmasq-blackhole");
sleep 1 # be sure that dnsmasq-blackhole is restarted before killing tun0 !
exec ("sudo /usr/bin/systemctl restart chilli");
break;
case 'new_ip' :
181,6 → 186,7
}
fclose($pointeur);
}
exec ("sudo /usr/local/bin/alcasar-file-clean.sh");
exec ("sudo /usr/bin/systemctl restart chilli");
break;
}