Line 1... |
Line 1... |
1 |
#!/bin/sh
|
1 |
#!/bin/sh
|
2 |
# $Id: alcasar.sh 648 2011-06-25 21:31:06Z richard $
|
2 |
# $Id: alcasar.sh 654 2011-06-27 19:30:28Z richard $
|
3 |
|
3 |
|
4 |
# alcasar.sh
|
4 |
# alcasar.sh
|
5 |
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
|
5 |
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
|
6 |
# This script is distributed under the Gnu General Public License (GPL)
|
6 |
# This script is distributed under the Gnu General Public License (GPL)
|
7 |
|
7 |
|
Line 683... |
Line 683... |
683 |
$SED "s?^[\t ]*#[\t ]*group =.*?group = radius?g" /etc/raddb/radiusd.conf
|
683 |
$SED "s?^[\t ]*#[\t ]*group =.*?group = radius?g" /etc/raddb/radiusd.conf
|
684 |
$SED "s?^[\t ]*status_server =.*?status_server = no?g" /etc/raddb/radiusd.conf
|
684 |
$SED "s?^[\t ]*status_server =.*?status_server = no?g" /etc/raddb/radiusd.conf
|
685 |
# suppression de la fonction proxy
|
685 |
# suppression de la fonction proxy
|
686 |
$SED "s?^[\t ]*proxy_requests.*?proxy_requests = no?g" /etc/raddb/radiusd.conf
|
686 |
$SED "s?^[\t ]*proxy_requests.*?proxy_requests = no?g" /etc/raddb/radiusd.conf
|
687 |
$SED "s?^[\t ]*\$INCLUDE proxy.conf.*?#\$INCLUDE proxy.conf?g" /etc/raddb/radiusd.conf
|
687 |
$SED "s?^[\t ]*\$INCLUDE proxy.conf.*?#\$INCLUDE proxy.conf?g" /etc/raddb/radiusd.conf
|
- |
|
688 |
# suppression du module EAP
|
- |
|
689 |
$SED "s?^[\t ]*\$INCLUDE eap.conf.*?#\$INCLUDE eap.conf?g" /etc/raddb/radiusd.conf
|
688 |
# écoute sur loopback uniquement (à modifier plus tard pour l'EAP)
|
690 |
# écoute sur loopback uniquement (à modifier plus tard pour l'EAP)
|
689 |
$SED "s?^[\t ]*ipaddr =.*?ipaddr = 127.0.0.1?g" /etc/raddb/radiusd.conf
|
691 |
$SED "s?^[\t ]*ipaddr =.*?ipaddr = 127.0.0.1?g" /etc/raddb/radiusd.conf
|
690 |
# prise en compte du module SQL et des compteurs SQL
|
692 |
# prise en compte du module SQL et des compteurs SQL
|
691 |
$SED "s?^[\t ]*#[\t ]*\$INCLUDE sql.conf.*?\$INCLUDE sql.conf?g" /etc/raddb/radiusd.conf
|
693 |
$SED "s?^[\t ]*#[\t ]*\$INCLUDE sql.conf.*?\$INCLUDE sql.conf?g" /etc/raddb/radiusd.conf
|
692 |
$SED "s?^[\t ]*#[\t ]*\$INCLUDE sql/mysql/counter.conf?\$INCLUDE sql/mysql/counter.conf?g" /etc/raddb/radiusd.conf
|
694 |
$SED "s?^[\t ]*#[\t ]*\$INCLUDE sql/mysql/counter.conf?\$INCLUDE sql/mysql/counter.conf?g" /etc/raddb/radiusd.conf
|
Line 1152... |
Line 1154... |
1152 |
chown -R root:apache $DIR_DEST_ETC/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
|
1154 |
chown -R root:apache $DIR_DEST_ETC/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
|
1153 |
# On fait pointer le black-hole sur une page interne
|
1155 |
# On fait pointer le black-hole sur une page interne
|
1154 |
$SED "s?^IP_RETOUR=.*?IP_RETOUR=\"$PRIVATE_IP\"?g" $DIR_DEST_SBIN/alcasar-bl.sh
|
1156 |
$SED "s?^IP_RETOUR=.*?IP_RETOUR=\"$PRIVATE_IP\"?g" $DIR_DEST_SBIN/alcasar-bl.sh
|
1155 |
# On récupère la dernière version de la BL Toulouse et on l'adapte à notre structure
|
1157 |
# On récupère la dernière version de la BL Toulouse et on l'adapte à notre structure
|
1156 |
$DIR_DEST_SBIN/alcasar-bl.sh --download
|
1158 |
$DIR_DEST_SBIN/alcasar-bl.sh --download
|
- |
|
1159 |
if [ "$mode" != "update" ]; then
|
- |
|
1160 |
$DIR_DEST_SBIN/alcasar-bl.sh --adapt
|
- |
|
1161 |
fi
|
1157 |
}
|
1162 |
}
|
1158 |
|
1163 |
|
1159 |
##########################################################
|
1164 |
##########################################################
|
1160 |
## Fonction cron ##
|
1165 |
## Fonction cron ##
|
1161 |
## - Mise en place des différents fichiers de cron ##
|
1166 |
## - Mise en place des différents fichiers de cron ##
|