Subversion Repositories ALCASAR

Rev

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

Rev 630 Rev 631
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#  $Id: alcasar.sh 630 2011-06-10 22:23:56Z franck $ 
2
#  $Id: alcasar.sh 631 2011-06-12 10:34:00Z 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 891... Line 891...
891
# on remplace la page d'interception (template)
891
# on remplace la page d'interception (template)
892
	cp -f $DIR_CONF/template.html /usr/share/dansguardian/languages/ukenglish/
892
	cp -f $DIR_CONF/template.html /usr/share/dansguardian/languages/ukenglish/
893
	cp -f $DIR_CONF/template-fr.html /usr/share/dansguardian/languages/french/template.html
893
	cp -f $DIR_CONF/template-fr.html /usr/share/dansguardian/languages/french/template.html
894
# on ne loggue que les deny (pour le reste, on a squid)
894
# on ne loggue que les deny (pour le reste, on a squid)
895
	$SED "s?^loglevel =.*?loglevel = 1?g" $DIR_DG/dansguardian.conf
895
	$SED "s?^loglevel =.*?loglevel = 1?g" $DIR_DG/dansguardian.conf
-
 
896
# lauch of 16 daemons
-
 
897
	$SED "s?^minchildren =.*?minchildren = 16?g" $DIR_DG/dansguardian.conf
896
# on désactive par défaut le controle de contenu des pages html
898
# on désactive par défaut le controle de contenu des pages html
897
	$SED "s?^weightedphrasemode =.*?weightedphrasemode = 0?g" $DIR_DG/dansguardian.conf
899
	$SED "s?^weightedphrasemode =.*?weightedphrasemode = 0?g" $DIR_DG/dansguardian.conf
898
	cp $DIR_DG/lists/bannedphraselist $DIR_DG/lists/bannedphraselist.default
900
	cp $DIR_DG/lists/bannedphraselist $DIR_DG/lists/bannedphraselist.default
899
	$SED "s?^[^#]?#&?g" $DIR_DG/lists/bannedphraselist # (on commente ce qui ne l'est pas)
901
	$SED "s?^[^#]?#&?g" $DIR_DG/lists/bannedphraselist # (on commente ce qui ne l'est pas)
900
# on désactive par défaut le contrôle d'URL par expressions régulières
902
# on désactive par défaut le contrôle d'URL par expressions régulières
Line 935... Line 937...
935
	chown -R havp /var/tmp/havp /var/log/havp /var/run/havp
937
	chown -R havp /var/tmp/havp /var/log/havp /var/run/havp
936
	$SED "/$HAVP_BIN -c $HAVP_CONFIG/i chown -R havp:havp \/var\/tmp\/havp" /etc/init.d/havp
938
	$SED "/$HAVP_BIN -c $HAVP_CONFIG/i chown -R havp:havp \/var\/tmp\/havp" /etc/init.d/havp
937
# configuration d'HAVP
939
# configuration d'HAVP
938
	[ -e /etc/havp/havp.config.default ] || cp /etc/havp/havp.config /etc/havp/havp.config.default
940
	[ -e /etc/havp/havp.config.default ] || cp /etc/havp/havp.config /etc/havp/havp.config.default
939
	$SED "/^REMOVETHISLINE/d" /etc/havp/havp.config
941
	$SED "/^REMOVETHISLINE/d" /etc/havp/havp.config
940
	$SED "s?^# PARENTPROXY.*?PARENTPROXY 127.0.0.1?g" /etc/havp/havp.config
942
	$SED "s?^# PARENTPROXY.*?PARENTPROXY 127.0.0.1?g" /etc/havp/havp.config		# datas come from DG
941
	$SED "s?^# PARENTPORT.*?PARENTPORT 3128?g" /etc/havp/havp.config
943
	$SED "s?^# PARENTPORT.*?PARENTPORT 3128?g" /etc/havp/havp.config		# datas are send to squid (3128)
942
	$SED "s?^# PORT.*?PORT 8090?g" /etc/havp/havp.config
944
	$SED "s?^# PORT.*?PORT 8090?g" /etc/havp/havp.config				# datas come on 8090			
943
	$SED "s?^# BIND_ADDRESS.*?BIND_ADDRESS 127.0.0.1?g" /etc/havp/havp.config
945
	$SED "s?^# BIND_ADDRESS.*?BIND_ADDRESS 127.0.0.1?g" /etc/havp/havp.config	# we listen only on loopback
944
	$SED "s?^ENABLECLAMLIB.*?ENABLECLAMLIB true?g" /etc/havp/havp.config
946
	$SED "s?^ENABLECLAMLIB.*?ENABLECLAMLIB true?g" /etc/havp/havp.config		# active libclamav AV
945
	$SED "s?^# LOG_OKS.*?LOG_OKS false?g" /etc/havp/havp.config
947
	$SED "s?^# LOG_OKS.*?LOG_OKS false?g" /etc/havp/havp.config			# log only when malware matches
-
 
948
	$SED "s?^# SERVERNUMBER.*?SERVERNUMBER 20?g" /etc/havp/havp.config		# 20 daemons are started simultaneously
946
# remplacement du fichier d'initialisation
949
# remplacement du fichier d'initialisation
947
	[ -e /etc/init.d/havp.default ] || cp /etc/init.d/havp /etc/init.d/havp.default
950
	[ -e /etc/init.d/havp.default ] || cp /etc/init.d/havp /etc/init.d/havp.default
948
	cp -f $DIR_CONF/havp-init /etc/init.d/havp
951
	cp -f $DIR_CONF/havp-init /etc/init.d/havp
949
# on remplace la page d'interception (template)
952
# on remplace la page d'interception (template)
950
	cp -f $DIR_CONF/virus-fr.html /etc/havp/templates/fr/virus.html
953
	cp -f $DIR_CONF/virus-fr.html /etc/havp/templates/fr/virus.html