Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 1278 2014-01-04 15:13:01Z richard $
|
2 |
# $Id: alcasar.sh 1293 2014-01-12 21:08:59Z 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 1047... |
Line 1047... |
1047 |
param_dansguardian ()
|
1047 |
param_dansguardian ()
|
1048 |
{
|
1048 |
{
|
1049 |
mkdir /var/dansguardian
|
1049 |
mkdir /var/dansguardian
|
1050 |
chown dansguardian /var/dansguardian
|
1050 |
chown dansguardian /var/dansguardian
|
1051 |
[ -e $DIR_DG/dansguardian.conf.default ] || cp $DIR_DG/dansguardian.conf $DIR_DG/dansguardian.conf.default
|
1051 |
[ -e $DIR_DG/dansguardian.conf.default ] || cp $DIR_DG/dansguardian.conf $DIR_DG/dansguardian.conf.default
|
1052 |
# Le filtrage est désactivé par défaut
|
1052 |
# By default the filter is off
|
1053 |
$SED "s/^reportinglevel =.*/reportinglevel = -1/g" $DIR_DG/dansguardian.conf
|
1053 |
$SED "s/^reportinglevel =.*/reportinglevel = -1/g" $DIR_DG/dansguardian.conf
|
1054 |
# la page d'interception est en français
|
1054 |
# French deny HTML page
|
1055 |
$SED "s?^language =.*?language = french?g" $DIR_DG/dansguardian.conf
|
1055 |
$SED "s?^language =.*?language = french?g" $DIR_DG/dansguardian.conf
|
1056 |
# on limite l'écoute de Dansguardian côté LAN
|
1056 |
# Listen only on LAN side
|
1057 |
$SED "s?^filterip.*?filterip = $PRIVATE_IP?g" $DIR_DG/dansguardian.conf
|
1057 |
$SED "s?^filterip.*?filterip = $PRIVATE_IP?g" $DIR_DG/dansguardian.conf
|
1058 |
# on chaîne Dansguardian au proxy cache SQUID
|
1058 |
# DG send its flow to SQUID
|
1059 |
$SED "s?^proxyport.*?proxyport = 3128?g" $DIR_DG/dansguardian.conf
|
1059 |
$SED "s?^proxyport.*?proxyport = 3128?g" $DIR_DG/dansguardian.conf
|
1060 |
# on remplace la page d'interception (template)
|
1060 |
# replace the default deny HTML page
|
1061 |
cp -f $DIR_CONF/template.html /usr/share/dansguardian/languages/ukenglish/
|
1061 |
cp -f $DIR_CONF/template.html /usr/share/dansguardian/languages/ukenglish/
|
1062 |
cp -f $DIR_CONF/template-fr.html /usr/share/dansguardian/languages/french/template.html
|
1062 |
cp -f $DIR_CONF/template-fr.html /usr/share/dansguardian/languages/french/template.html
|
1063 |
# on ne loggue que les deny (pour le reste, on a squid)
|
1063 |
# Don't log
|
1064 |
$SED "s?^loglevel =.*?loglevel = 1?g" $DIR_DG/dansguardian.conf
|
1064 |
$SED "s?^loglevel =.*?loglevel = 0?g" $DIR_DG/dansguardian.conf
|
1065 |
# lauch of 10 daemons (20 in largest server)
|
1065 |
# Run 10 daemons (20 in largest server)
|
1066 |
$SED "s?^minchildren =.*?minchildren = 10?g" $DIR_DG/dansguardian.conf
|
1066 |
$SED "s?^minchildren =.*?minchildren = 10?g" $DIR_DG/dansguardian.conf
|
1067 |
# on désactive par défaut le controle de contenu des pages html
|
1067 |
# on désactive par défaut le controle de contenu des pages html
|
1068 |
$SED "s?^weightedphrasemode =.*?weightedphrasemode = 0?g" $DIR_DG/dansguardian.conf
|
1068 |
$SED "s?^weightedphrasemode =.*?weightedphrasemode = 0?g" $DIR_DG/dansguardian.conf
|
1069 |
cp $DIR_DG/lists/bannedphraselist $DIR_DG/lists/bannedphraselist.default
|
1069 |
cp $DIR_DG/lists/bannedphraselist $DIR_DG/lists/bannedphraselist.default
|
1070 |
$SED "s?^[^#]?#&?g" $DIR_DG/lists/bannedphraselist # (on commente ce qui ne l'est pas)
|
1070 |
$SED "s?^[^#]?#&?g" $DIR_DG/lists/bannedphraselist # (on commente ce qui ne l'est pas)
|