Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 878 2012-06-03 16:07:40Z richard $
|
2 |
# $Id: alcasar.sh 885 2012-06-11 21:33:50Z 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 1290... |
Line 1290... |
1290 |
# On ajoute Bing et Youtube à la récriture d'URL liée au contrôle scolaire/parental
|
1290 |
# On ajoute Bing et Youtube à la récriture d'URL liée au contrôle scolaire/parental
|
1291 |
cat <<EOF >> $DIR_DG/lists/urlregexplist
|
1291 |
cat <<EOF >> $DIR_DG/lists/urlregexplist
|
1292 |
# Bing - add 'adlt=strict'
|
1292 |
# Bing - add 'adlt=strict'
|
1293 |
#"(^http://[0-9a-z]+\.bing\.[a-z]+[-/%.0-9a-z]*\?)(.*)"->"\1\2&adlt=strict"
|
1293 |
#"(^http://[0-9a-z]+\.bing\.[a-z]+[-/%.0-9a-z]*\?)(.*)"->"\1\2&adlt=strict"
|
1294 |
# Youtube - add 'edufilter=your_ID'
|
1294 |
# Youtube - add 'edufilter=your_ID'
|
1295 |
#"(^http://[0-9a-z]+\.youtube\.[a-z]+[-/%.0-9a-z]*\?)(.*)"->"\1\2&edufilter=AAGG0dDxGViM51LeLNifnw"
|
1295 |
#"(^http://[0-9a-z]+\.youtube\.[a-z]+[-/%.0-9a-z]*\?)(.*)"->"\1\2&edufilter=ABCD1234567890abcdef"
|
1296 |
EOF
|
1296 |
EOF
|
1297 |
chown -R dansguardian:apache $DIR_DG
|
1297 |
chown -R dansguardian:apache $DIR_DG
|
1298 |
chmod -R g+rw $DIR_DG
|
1298 |
chmod -R g+rw $DIR_DG
|
1299 |
# On crée la structure du DNS-blackhole :
|
1299 |
# On crée la structure du DNS-blackhole :
|
1300 |
mkdir $DIR_DEST_ETC/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
|
1300 |
mkdir $DIR_DEST_ETC/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
|
Line 1419... |
Line 1419... |
1419 |
echo "SSH=off" >> $CONF_FILE
|
1419 |
echo "SSH=off" >> $CONF_FILE
|
1420 |
echo 'Admin_from_IP="0.0.0.0/0.0.0.0"' >> $CONF_FILE
|
1420 |
echo 'Admin_from_IP="0.0.0.0/0.0.0.0"' >> $CONF_FILE
|
1421 |
echo "QOS=off" >> $CONF_FILE
|
1421 |
echo "QOS=off" >> $CONF_FILE
|
1422 |
echo "LDAP=off" >> $CONF_FILE
|
1422 |
echo "LDAP=off" >> $CONF_FILE
|
1423 |
echo "LDAP_IP=0.0.0.0/0.0.0.0" >> $CONF_FILE
|
1423 |
echo "LDAP_IP=0.0.0.0/0.0.0.0" >> $CONF_FILE
|
- |
|
1424 |
echo "WEB_ANTIVIRUS=on" >> $CONF_FILE
|
1424 |
echo "PROTOCOLS_FILTERING=off" >> $CONF_FILE
|
1425 |
echo "PROTOCOLS_FILTERING=off" >> $CONF_FILE
|
1425 |
echo "DNS_FILTERING=off" >> $CONF_FILE
|
1426 |
echo "DNS_FILTERING=off" >> $CONF_FILE
|
1426 |
echo "WEB_ANTIVIRUS=on" >> $CONF_FILE
|
1427 |
echo "YOUTUBE_ID=ABCD1234567890abcdef" >> $CONF_FILE
|
1427 |
# Coloration des prompts
|
1428 |
# Coloration des prompts
|
1428 |
[ -e /etc/bashrc.default ] || cp /etc/bashrc /etc/bashrc.default
|
1429 |
[ -e /etc/bashrc.default ] || cp /etc/bashrc /etc/bashrc.default
|
1429 |
cp -f $DIR_CONF/bashrc /etc/. ; chmod 644 /etc/bashrc ; chown root:root /etc/bashrc
|
1430 |
cp -f $DIR_CONF/bashrc /etc/. ; chmod 644 /etc/bashrc ; chown root:root /etc/bashrc
|
1430 |
$SED "s?^ORGANISME.*?ORGANISME=$ORGANISME?g" /etc/bashrc
|
1431 |
$SED "s?^ORGANISME.*?ORGANISME=$ORGANISME?g" /etc/bashrc
|
1431 |
# Droits d'exécution pour utilisateur apache et sysadmin
|
1432 |
# Droits d'exécution pour utilisateur apache et sysadmin
|