Subversion Repositories ALCASAR

Rev

Rev 73 | Rev 80 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 73 Rev 75
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#  $Id: alcasar.sh 73 2010-04-15 17:57:11Z franck $ 
2
#  $Id: alcasar.sh 75 2010-04-15 21:54: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 863... Line 863...
863
	$SED "s/^reportinglevel =.*/reportinglevel = -1/g" /etc/dansguardian/dansguardian.conf
863
	$SED "s/^reportinglevel =.*/reportinglevel = -1/g" /etc/dansguardian/dansguardian.conf
864
# la page d'interception est en français
864
# la page d'interception est en français
865
	$SED "s?^language =.*?language = french?g" /etc/dansguardian/dansguardian.conf
865
	$SED "s?^language =.*?language = french?g" /etc/dansguardian/dansguardian.conf
866
# on limite l'écoute de Dansguardian côté LAN
866
# on limite l'écoute de Dansguardian côté LAN
867
	$SED "s?^filterip =.*?filterip = $PRIVATE_IP?g" /etc/dansguardian/dansguardian.conf
867
	$SED "s?^filterip =.*?filterip = $PRIVATE_IP?g" /etc/dansguardian/dansguardian.conf
-
 
868
# on chaîne Dansguardian au proxy antivirus HAVP
-
 
869
	$SED "s?^proxyport.*?proxyport 8090?g" /etc/dansguardian/dansguardian.conf
868
# on remplace la page d'interception (template)
870
# on remplace la page d'interception (template)
869
	cp -f $DIR_CONF/template.html /usr/share/dansguardian/languages/ukenglish/
871
	cp -f $DIR_CONF/template.html /usr/share/dansguardian/languages/ukenglish/
870
	cp -f $DIR_CONF/template-fr.html /usr/share/dansguardian/languages/french/template.html
872
	cp -f $DIR_CONF/template-fr.html /usr/share/dansguardian/languages/french/template.html
871
# on ne loggue que les deny (pour le reste, on a squid)
873
# on ne loggue que les deny (pour le reste, on a squid)
872
	$SED "s?^loglevel =.*?loglevel = 1?g" /etc/dansguardian/dansguardian.conf
874
	$SED "s?^loglevel =.*?loglevel = 1?g" /etc/dansguardian/dansguardian.conf
Line 925... Line 927...
925
{
927
{
926
# création de la partition de stockage temporaire (100Mo)
928
# création de la partition de stockage temporaire (100Mo)
927
useradd -r havp
929
useradd -r havp
928
dd if=/dev/zero of=/tmp/havp-disk bs=1024k count=30
930
dd if=/dev/zero of=/tmp/havp-disk bs=1024k count=30
929
mkfs.ext4 -qF /tmp/havp-disk
931
mkfs.ext4 -qF /tmp/havp-disk
930
mkdir /var/tmp/havp
932
mkdir /var/tmp/havp /var/log/havp /var/run/havp
931
chown havp:havp /var/tmp/havp
933
chown havp:havp /var/tmp/havp /var/log/havp /var/run/havp
932
echo "# Entry for havp tmp files scan partition" >> /etc/fstab
934
echo "# Entry for havp tmp files scan partition" >> /etc/fstab
933
echo "/tmp/havp-disk /var/tmp/havp ext4 loop,mand,noatime,async" >> /etc/fstab
935
echo "/tmp/havp-disk /var/tmp/havp ext4 loop,mand,noatime,async" >> /etc/fstab
-
 
936
# copie et configuration d'HAVP
934
cp $DIR_CONF/havp/havp $DIR_DEST_SBIN
937
cp $DIR_CONF/havp/havp $DIR_DEST_SBIN
935
cp -r $DIR_CONF/havp/etc/havp $DIR_DEST_ETC
938
cp -r $DIR_CONF/havp/etc/havp $DIR_DEST_ETC
936
cp $DIR_CONF/havp/etc/init.d/havp /etc/init.d/
939
cp $DIR_CONF/havp/etc/init.d/havp /etc/init.d/
937
chkconfig --level 345 havp on
940
chkconfig --level 345 havp on
938
chkconfig --level 01267 havp off
941
chkconfig --level 01267 havp off