Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1962 → Rev 1963

/alcasar.sh
936,11 → 936,16
$SED "s?^#bind-address.*?bind-address=127.0.0.1?g" /etc/my.cnf
$SED "s?^tmpdir.*?tmpdir=/tmp?g" /etc/my.cnf
/usr/bin/systemctl start mysqld.service
sleep 4
is_active=`systemctl is-active mysqld`
if [ "$is_active" != "active" ]
then
sleep 4 # we need to wait again (slow machine)
nb_round=1
while [ ! -f /var/run/mysqld/mysqld.pid ] && [ $nb_round -ne 10 ] # we wait until mariadb is on
do
nb_round=`expr $nb_round + 1`
sleep 2
done
if [ ! -f /var/run/mysqld/mysqld.pid ]
then
echo "Problème : la base donnée ne s'est pas lancée ! "
exit
fi
mysqladmin -u root password $mysqlpwd
MYSQL="/usr/bin/mysql -uroot -p$mysqlpwd --exec"
/scripts/alcasar-importcert.sh
29,11 → 29,15
{
$SED "s/^HOSTNAME=.*/HOSTNAME=alcasar/g" /usr/local/etc/alcasar.conf
$SED "s/^DOMAIN=.*/DOMAIN=localdomain/g" /usr/local/etc/alcasar.conf
$SED "s/\.([a-zA-Z][a-zA-Z0-9-]+(\.[a-z]{2,4})?)/.localdomain/g" /etc/hosts
$SED "s/alcasar\.([a-zA-Z0-9-]+(\.[a-z]{2,4})?)/alcasar.localdomain/g" /etc/chilli.conf
$SED "s/^domain.*/domain\t\tlocaldomain/g" /etc/chilli.conf
cat <<EOF > /etc/hosts
127.0.0.1 localhost
$PRIVATE_IP alcasar alcasar.localdomain
EOF
$SED "s/^locationname.*/locationname\talcasar.localdomain/g" /etc/chilli.conf
$SED "s/^uamserver.*/uamserver\thttps:\/\/alcasar.localdomain\/intercept.php/g" /etc/chilli.conf
$SED "s/^radiusnasid.*/radiusnasid\talcasar.localdomain/g" /etc/chilli.conf
$SED "s/^uamallowed.*/uamallowed\talcasar,alcasar.localdomain/g" /etc/chilli.conf
$SED "s/^ServerName.*/ServerName alcasar.localdomain/g" /etc/httpd/conf/httpd.conf
$SED "s/^domain=.*/domain=localdomain/g" /etc/dnsmasq.conf
hostnamectl set-hostname alcasar.localdomain
$SED "s/^\tErrorDocument.*/\tErrorDocument 404 https:\/\/alcasar.localdomain\//g" /etc/httpd/conf/webapps.d/alcasar.conf
$SED "s/^\tAuthDigestDomain.*/\tAuthDigestDomain alcasar.localdomain/g" /etc/httpd/conf/webapps.d/alcasar.conf
74,7 → 78,7
$SED "s/^DOMAIN=.*/DOMAIN=$domain/g" /usr/local/etc/alcasar.conf
cat <<EOF > /etc/hosts
127.0.0.1 localhost
$PRIVATE_IP $fqdn $hostname
$PRIVATE_IP $hostname $hostname.localdomain $fqdn
EOF
$SED "s/^locationname.*/locationname\t$fqdn/g" /etc/chilli.conf
$SED "s/^uamserver.*/uamserver\thttps:\/\/$fqdn\/intercept.php/g" /etc/chilli.conf