Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 2433 2017-10-30 23:02:21Z richard $
|
2 |
# $Id: alcasar.sh 2438 2017-11-12 23:19:57Z richard $
|
3 |
|
3 |
|
4 |
# alcasar.sh
|
4 |
# alcasar.sh
|
5 |
|
5 |
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
Line 1082... |
Line 1082... |
1082 |
$SED "s?^[\t ]*\$INCLUDE proxy.conf.*?#\$INCLUDE proxy.conf?g" /etc/raddb/radiusd.conf # remove the proxy function
|
1082 |
$SED "s?^[\t ]*\$INCLUDE proxy.conf.*?#\$INCLUDE proxy.conf?g" /etc/raddb/radiusd.conf # remove the proxy function
|
1083 |
|
1083 |
|
1084 |
# Set "client.conf" to describe radius clients (coova on 127.0.0.1)
|
1084 |
# Set "client.conf" to describe radius clients (coova on 127.0.0.1)
|
1085 |
[ -e /etc/raddb/clients.conf.default ] || cp -f /etc/raddb/clients.conf /etc/raddb/clients.conf.default
|
1085 |
[ -e /etc/raddb/clients.conf.default ] || cp -f /etc/raddb/clients.conf /etc/raddb/clients.conf.default
|
1086 |
cat << EOF > /etc/raddb/clients.conf
|
1086 |
cat << EOF > /etc/raddb/clients.conf
|
1087 |
client 127.0.0.1 {
|
1087 |
client localhost {
|
- |
|
1088 |
ipaddr = 127.0.0.1
|
1088 |
secret = $secretradius
|
1089 |
secret = $secretradius
|
1089 |
shortname = coova
|
1090 |
shortname = chilli
|
- |
|
1091 |
nas_type = other
|
1090 |
}
|
1092 |
}
|
1091 |
EOF
|
1093 |
EOF
|
1092 |
# Set Virtual server (remvove all except "alcasar virtual site")
|
1094 |
# Set Virtual server (remvove all except "alcasar virtual site")
|
1093 |
rm -f /etc/raddb/sites-enabled/*
|
1095 |
rm -f /etc/raddb/sites-enabled/*
|
1094 |
cp $DIR_CONF/radius/alcasar-radius /etc/raddb/sites-available/alcasar
|
1096 |
cp $DIR_CONF/radius/alcasar-radius /etc/raddb/sites-available/alcasar
|
Line 1098... |
Line 1100... |
1098 |
# INFO : To connect from outside (EAP), add the EAP virtual server (link in sites-enabled) and inner-tunnel modules (link in mods-enabled)
|
1100 |
# INFO : To connect from outside (EAP), add the EAP virtual server (link in sites-enabled) and inner-tunnel modules (link in mods-enabled)
|
1099 |
|
1101 |
|
1100 |
# Set modules
|
1102 |
# Set modules
|
1101 |
# Set only usefull modules for ALCASAR (ldap is enabled only via ACC)
|
1103 |
# Set only usefull modules for ALCASAR (ldap is enabled only via ACC)
|
1102 |
rm -rf /etc/raddb/mods-enabled/*
|
1104 |
rm -rf /etc/raddb/mods-enabled/*
|
1103 |
for mods in sql sqlcounter attr_filter expiration logintime pap
|
1105 |
for mods in sql sqlcounter attr_filter expiration logintime pap expr
|
1104 |
do
|
1106 |
do
|
1105 |
ln -s /etc/raddb/mods-available/$mods /etc/raddb/mods-enabled/$mods
|
1107 |
ln -s /etc/raddb/mods-available/$mods /etc/raddb/mods-enabled/$mods
|
1106 |
done
|
1108 |
done
|
1107 |
# Configure SQL mod
|
1109 |
# Configure SQL mod
|
1108 |
[ -e /etc/raddb/mods-available/sql.default ] || cp /etc/raddb/mods-available/sql /etc/raddb/mods-available/sql.default
|
1110 |
[ -e /etc/raddb/mods-available/sql.default ] || cp /etc/raddb/mods-available/sql /etc/raddb/mods-available/sql.default
|