Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1268 → Rev 1269

/scripts/alcasar-conf.sh
301,7 → 301,6
$SED "s?^dns1.*?dns1\t\t$PRIVATE_IP?g" /etc/chilli.conf
$SED "s?^dns2.*?dns2\t\t$PRIVATE_IP?g" /etc/chilli.conf
$SED "s?^uamlisten.*?uamlisten\t$PRIVATE_IP?g" /etc/chilli.conf
$SED "s?^\$organisme = .*?\$organisme = \"$ORGANISME\";?g" /var/www/html/intercept.php /var/www/html/status.php
# dhcp (coova + dnsmasq)
$DIR_SBIN/alcasar-dhcp.sh -$DHCP_mode
# dnsmasq
/web/intercept.php
56,7 → 56,7
exit("Erreur d'ouverture du fichier ".CONF_FILE);
}
fclose($ouvre);
$organisme = $conf["ORGANISM"];
$organisme = trim($conf["ORGANISM"]);
 
# Shared secret used to encrypt challenge with radius.
$uamsecret = "";
66,7 → 66,7
 
# Our own path
$loginpath = $_SERVER['PHP_SELF'];
$alcasarpath = "http://alcasar";
$alcasarpath = "http://alcasar.".trim($conf["DOMAIN"]);
$statuspath = $alcasarpath."/status.php";
$debug = false;
 
/alcasar.sh
600,29 → 600,6
/usr/sbin/htdigest -c $DIR_DEST_ETC/digest/key_admin $HOSTNAME.$DOMAIN $admin_portal
done
$DIR_DEST_SBIN/alcasar-profil.sh --list
else # update needed for versions previous then 2.8 due to the integration of the domain name ("localdomain" by default)
if [ $MAJ_PREVIOUS_VERSION -lt 2 ] || ([ $MAJ_PREVIOUS_VERSION -eq 2 ] && [ $MIN_PREVIOUS_VERSION -lt 8 ])
then
if [ $Lang == "fr" ]
then
echo "Cette mise à jour nécessite de redéfinir le premier compte d'administration du portail"
echo
echo -n "Nom : "
else
echo "This update need to redefine the first admin account"
echo
echo -n "Account : "
fi
read admin_portal
[ -d $DIR_DEST_ETC/digest ] && rm -rf $DIR_DEST_ETC/digest
mkdir -p $DIR_DEST_ETC/digest
chmod 755 $DIR_DEST_ETC/digest
until [ -s $DIR_DEST_ETC/digest/key_admin ]
do
/usr/sbin/htdigest -c $DIR_DEST_ETC/digest/key_admin $HOSTNAME.$DOMAIN $admin_portal
done
$DIR_DEST_SBIN/alcasar-profil.sh --list
fi
fi
# synchronisation horaire
ntpd -q -g &
1654,6 → 1631,30
$DIR_DEST_BIN/alcasar-conf.sh --apply
$SED "s?^INSTALL_DATE=.*?INSTALL_DATE=$DATE?g" $CONF_FILE
$SED "s?^VERSION=.*?VERSION=$VERSION?g" $CONF_FILE
if [ $MAJ_PREVIOUS_VERSION -lt 2 ] || ([ $MAJ_PREVIOUS_VERSION -eq 2 ] && [ $MIN_PREVIOUS_VERSION -lt 8 ])
# update needed for versions previous then 2.8 due to the integration of the domainname ("localdomain" by default)
then
header_install
if [ $Lang == "fr" ]
then
echo "Cette mise à jour nécessite de redéfinir le premier compte d'administration du portail"
echo
echo -n "Nom : "
else
echo "This update need to redefine the first admin account"
echo
echo -n "Account : "
fi
read admin_portal
[ -d $DIR_DEST_ETC/digest ] && rm -rf $DIR_DEST_ETC/digest
mkdir -p $DIR_DEST_ETC/digest
chmod 755 $DIR_DEST_ETC/digest
until [ -s $DIR_DEST_ETC/digest/key_admin ]
do
/usr/sbin/htdigest -c $DIR_DEST_ETC/digest/key_admin $HOSTNAME.$DOMAIN $admin_portal
done
$DIR_DEST_SBIN/alcasar-profil.sh --list
fi
fi
rm -f /tmp/alcasar-conf*
chown -R root:apache $DIR_DEST_ETC/*