Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2979 → Rev 2978

/web/acc/manager/htdocs/activity.php
31,7 → 31,7
$tmp = explode("/",$conf["PRIVATE_IP"]);
$private_ip=$tmp[0];
$intif = $conf["INTIF"];
if ($conf['MULTIWAN'] !== 'off') {
if ($conf['MULTIWAN'] !== 'Off') {
exec ('sudo /usr/local/bin/alcasar-list-ip_gw.sh', $list_ip_gw);
}
require('/etc/freeradius-web/config.php');
165,7 → 165,7
<th><?= $l_user ?></th>
<th><?= $l_action ?></th>
<?php
if ($conf['MULTIWAN'] !== 'off') {
if ($conf['MULTIWAN'] !== 'Off') {
echo "<th>$l_gw</th>";
}
echo "</tr>";
279,7 → 279,7
}
echo "</form></td>";
}
if ($conf['MULTIWAN'] !== 'off') {
if ($conf['MULTIWAN'] !== 'Off') {
if ($detail[4] == "1"){ // authenticated user
while (list(,$ligne2) = each($list_ip_gw)){
$detail2 = explode (" ", $ligne2);
/web/acc/admin/network.php
438,9 → 438,9
file_put_contents(TEMP_FILE, str_replace('PROXY_IP='.$conf['PROXY_IP'], 'PROXY_IP='.trim($_POST['proxy']), file_get_contents(TEMP_FILE)));
$modification_proxy = true;
}
if ($conf['MULTIWAN'] !== 'off')
if ($conf['MULTIWAN'] !== 'Off')
{
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], 'MULTIWAN=off', file_get_contents(TEMP_FILE)));
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], 'MULTIWAN=Off', file_get_contents(TEMP_FILE)));
$modification_network = true;
}
}
447,9 → 447,9
else
{
//set multiwan value to off and delete every "WANx=" line
if ($_POST['gw_count'] === "1" && $conf['MULTIWAN'] !== 'off')
if ($_POST['gw_count'] === "1" && $conf['MULTIWAN'] !== 'Off')
{
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], 'MULTIWAN=off', file_get_contents(TEMP_FILE)));
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], 'MULTIWAN=Off', file_get_contents(TEMP_FILE)));
$temp = 1;
while (isset($conf['WAN'.$temp]))
{
500,7 → 500,7
}
file_put_contents(TEMP_FILE, str_replace('PUBLIC_WEIGHT='.$conf['PUBLIC_WEIGHT'], 'PUBLIC_WEIGHT='.(($_POST['weight'] !== '')?$_POST['weight']:1), file_get_contents(TEMP_FILE)));
//Set Multiwan status
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], "MULTIWAN=on\nWAN1=", file_get_contents(TEMP_FILE)));
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], "MULTIWAN=On\nWAN1=", file_get_contents(TEMP_FILE)));
//Adding the correct number of "WANx=" lines, numbered
for($i=2;$i<$_POST['gw_count'];$i++)
{
526,8 → 526,8
if ($conf['PROXY'] !== 'Off')
{
file_put_contents(TEMP_FILE, str_replace('PROXY='.$conf['PROXY'], 'PROXY=Off', file_get_contents(TEMP_FILE)));
if($_POST['gw_count'] !== "1" && $conf['MULTIWAN'] !== 'on') {
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], 'MULTIWAN=on', file_get_contents(TEMP_FILE)));
if($_POST['gw_count'] !== "1" && $conf['MULTIWAN'] !== 'On') {
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], 'MULTIWAN=On', file_get_contents(TEMP_FILE)));
$modification_network = true;
}
$modification_proxy = true;
/alcasar.sh
2187,7 → 2187,7
echo "IOT_CAPTURE=off" >> $CONF_FILE
echo "WIFI4EU=off" >> $CONF_FILE
echo "WIFI4EU_CODE=123e4567-e89b-12d3-a456-426655440000" >> $CONF_FILE
echo "MULTIWAN=off" >> $CONF_FILE
echo "MULTIWAN=Off" >> $CONF_FILE
# Prompt customisation (colors)
[ -e /etc/bashrc.default ] || cp /etc/bashrc /etc/bashrc.default
cp -f $DIR_CONF/bashrc /etc/. ; chmod 644 /etc/bashrc ; chown root:root /etc/bashrc
/scripts/alcasar-network.sh
14,7 → 14,7
GW1=`grep ^GW= $CONF_FILE|cut -d"=" -f2`
MTU=`grep ^PUBLIC_MTU= $CONF_FILE|cut -d"=" -f2`
MULTIWAN=`grep ^MULTIWAN= $CONF_FILE|cut -d"=" -f2`
MULTIWAN=${MULTIWAN:=off}
MULTIWAN=${MULTIWAN:=Off}
NET="`ipcalc -n $PUBLIC_IP | cut -d"=" -f2`/`ipcalc -p $PUBLIC_IP | cut -d"=" -f2`"
IP=`echo $PUBLIC_IP | cut -d"/" -f1`
PRIVATE_IP_MASK=`grep ^PRIVATE_IP $CONF_FILE | cut -d"=" -f2`