| Line 1... |
Line 1... |
| 1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
| 2 |
# $Id: alcasar.sh 847 2012-03-30 22:01:21Z richard $
|
2 |
# $Id: alcasar.sh 854 2012-04-09 19:31:46Z 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 1285... |
Line 1285... |
| 1285 |
chmod -R g+rw $DIR_DG
|
1285 |
chmod -R g+rw $DIR_DG
|
| 1286 |
# On crée la structure du DNS-blackhole :
|
1286 |
# On crée la structure du DNS-blackhole :
|
| 1287 |
mkdir $DIR_DEST_ETC/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
|
1287 |
mkdir $DIR_DEST_ETC/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
|
| 1288 |
chown -R 770 $DIR_DEST_ETC/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
|
1288 |
chown -R 770 $DIR_DEST_ETC/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
|
| 1289 |
chown -R root:apache $DIR_DEST_ETC/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
|
1289 |
chown -R root:apache $DIR_DEST_ETC/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
|
| 1290 |
# On fait pointer le black-hole sur une page interne
|
- |
|
| 1291 |
$SED "s?^IP_RETOUR=.*?IP_RETOUR=\"$PRIVATE_IP\"?g" $DIR_DEST_SBIN/alcasar-bl.sh
|
- |
|
| 1292 |
# On adapte la BL de Toulouse à notre structure
|
1290 |
# On adapte la BL de Toulouse à notre structure
|
| 1293 |
if [ "$mode" != "update" ]; then
|
1291 |
if [ "$mode" != "update" ]; then
|
| 1294 |
$DIR_DEST_SBIN/alcasar-bl.sh --adapt
|
1292 |
$DIR_DEST_SBIN/alcasar-bl.sh --adapt
|
| 1295 |
fi
|
1293 |
fi
|
| 1296 |
}
|
1294 |
}
|
| Line 1738... |
Line 1736... |
| 1738 |
PTN='^[oOnN]$'
|
1736 |
PTN='^[oOnN]$'
|
| 1739 |
until [[ $(expr $response : $PTN) -gt 0 ]]
|
1737 |
until [[ $(expr $response : $PTN) -gt 0 ]]
|
| 1740 |
do
|
1738 |
do
|
| 1741 |
if [ $Lang == "fr" ]
|
1739 |
if [ $Lang == "fr" ]
|
| 1742 |
then echo -n "Voulez-vous créer le fichier de configuration de la version actuelle (0/n)? ";
|
1740 |
then echo -n "Voulez-vous créer le fichier de configuration de la version actuelle (0/n)? ";
|
| 1743 |
else echo -n "Do you want to crate the running version configuration file (Y/n)? ";
|
1741 |
else echo -n "Do you want to create the running version configuration file (Y/n)? ";
|
| 1744 |
fi
|
1742 |
fi
|
| 1745 |
read response
|
1743 |
read response
|
| 1746 |
done
|
1744 |
done
|
| 1747 |
if [ "$reponse" = "o" ] || [ "$reponse" = "O" ] || [ "$response" = "Y" ] || [ "$response" = "y" ]
|
1745 |
if [ "$reponse" = "o" ] || [ "$reponse" = "O" ] || [ "$response" = "Y" ] || [ "$response" = "y" ]
|
| 1748 |
then
|
1746 |
then
|