Line 27... |
Line 27... |
27 |
|
27 |
|
28 |
function defaultNdd()
|
28 |
function defaultNdd()
|
29 |
{
|
29 |
{
|
30 |
$SED "s/^HOSTNAME=.*/HOSTNAME=alcasar/g" /usr/local/etc/alcasar.conf
|
30 |
$SED "s/^HOSTNAME=.*/HOSTNAME=alcasar/g" /usr/local/etc/alcasar.conf
|
31 |
$SED "s/^DOMAIN=.*/DOMAIN=localdomain/g" /usr/local/etc/alcasar.conf
|
31 |
$SED "s/^DOMAIN=.*/DOMAIN=localdomain/g" /usr/local/etc/alcasar.conf
|
- |
|
32 |
cat <<EOF > /etc/hosts
|
- |
|
33 |
127.0.0.1 localhost
|
- |
|
34 |
$PRIVATE_IP alcasar alcasar.localdomain
|
- |
|
35 |
EOF
|
32 |
$SED "s/\.([a-zA-Z][a-zA-Z0-9-]+(\.[a-z]{2,4})?)/.localdomain/g" /etc/hosts
|
36 |
$SED "s/^locationname.*/locationname\talcasar.localdomain/g" /etc/chilli.conf
|
- |
|
37 |
$SED "s/^uamserver.*/uamserver\thttps:\/\/alcasar.localdomain\/intercept.php/g" /etc/chilli.conf
|
33 |
$SED "s/alcasar\.([a-zA-Z0-9-]+(\.[a-z]{2,4})?)/alcasar.localdomain/g" /etc/chilli.conf
|
38 |
$SED "s/^radiusnasid.*/radiusnasid\talcasar.localdomain/g" /etc/chilli.conf
|
34 |
$SED "s/^domain.*/domain\t\tlocaldomain/g" /etc/chilli.conf
|
39 |
$SED "s/^uamallowed.*/uamallowed\talcasar,alcasar.localdomain/g" /etc/chilli.conf
|
35 |
$SED "s/^ServerName.*/ServerName alcasar.localdomain/g" /etc/httpd/conf/httpd.conf
|
40 |
$SED "s/^ServerName.*/ServerName alcasar.localdomain/g" /etc/httpd/conf/httpd.conf
|
36 |
$SED "s/^domain=.*/domain=localdomain/g" /etc/dnsmasq.conf
|
- |
|
37 |
hostnamectl set-hostname alcasar.localdomain
|
41 |
hostnamectl set-hostname alcasar.localdomain
|
38 |
$SED "s/^\tErrorDocument.*/\tErrorDocument 404 https:\/\/alcasar.localdomain\//g" /etc/httpd/conf/webapps.d/alcasar.conf
|
42 |
$SED "s/^\tErrorDocument.*/\tErrorDocument 404 https:\/\/alcasar.localdomain\//g" /etc/httpd/conf/webapps.d/alcasar.conf
|
39 |
$SED "s/^\tAuthDigestDomain.*/\tAuthDigestDomain alcasar.localdomain/g" /etc/httpd/conf/webapps.d/alcasar.conf
|
43 |
$SED "s/^\tAuthDigestDomain.*/\tAuthDigestDomain alcasar.localdomain/g" /etc/httpd/conf/webapps.d/alcasar.conf
|
40 |
$SED "s/^ ServerName.*/ ServerName alcasar.localdomain/g" /etc/httpd/conf/sites.d/00_default_vhosts.conf /etc/httpd/conf/sites.d/00_default_ssl_vhost.conf
|
44 |
$SED "s/^ ServerName.*/ ServerName alcasar.localdomain/g" /etc/httpd/conf/sites.d/00_default_vhosts.conf /etc/httpd/conf/sites.d/00_default_ssl_vhost.conf
|
41 |
}
|
45 |
}
|
Line 72... |
Line 76... |
72 |
then
|
76 |
then
|
73 |
$SED "s/^HOSTNAME=.*/HOSTNAME=$hostname/g" /usr/local/etc/alcasar.conf
|
77 |
$SED "s/^HOSTNAME=.*/HOSTNAME=$hostname/g" /usr/local/etc/alcasar.conf
|
74 |
$SED "s/^DOMAIN=.*/DOMAIN=$domain/g" /usr/local/etc/alcasar.conf
|
78 |
$SED "s/^DOMAIN=.*/DOMAIN=$domain/g" /usr/local/etc/alcasar.conf
|
75 |
cat <<EOF > /etc/hosts
|
79 |
cat <<EOF > /etc/hosts
|
76 |
127.0.0.1 localhost
|
80 |
127.0.0.1 localhost
|
77 |
$PRIVATE_IP $fqdn $hostname
|
81 |
$PRIVATE_IP $hostname $hostname.localdomain $fqdn
|
78 |
EOF
|
82 |
EOF
|
79 |
$SED "s/^locationname.*/locationname\t$fqdn/g" /etc/chilli.conf
|
83 |
$SED "s/^locationname.*/locationname\t$fqdn/g" /etc/chilli.conf
|
80 |
$SED "s/^uamserver.*/uamserver\thttps:\/\/$fqdn\/intercept.php/g" /etc/chilli.conf
|
84 |
$SED "s/^uamserver.*/uamserver\thttps:\/\/$fqdn\/intercept.php/g" /etc/chilli.conf
|
81 |
$SED "s/^radiusnasid.*/radiusnasid\t$fqdn/g" /etc/chilli.conf
|
85 |
$SED "s/^radiusnasid.*/radiusnasid\t$fqdn/g" /etc/chilli.conf
|
82 |
$SED "s/^uamallowed.*/uamallowed\t$hostname,$fqdn/g" /etc/chilli.conf
|
86 |
$SED "s/^uamallowed.*/uamallowed\t$hostname,$fqdn/g" /etc/chilli.conf
|