Subversion Repositories ALCASAR

Rev

Rev 333 | Rev 337 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 333 Rev 335
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#  $Id: alcasar.sh 333 2010-11-20 10:33:53Z franck $ 
2
#  $Id: alcasar.sh 335 2010-11-21 22:48:10Z 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 798... Line 798...
798
	$SED "s?^CMDSOCK=.*?CMDSOCK=\$RUN_D/chilli.sock?g" /etc/chilli/functions
798
	$SED "s?^CMDSOCK=.*?CMDSOCK=\$RUN_D/chilli.sock?g" /etc/chilli/functions
799
# modification du fichier d'initialisation
799
# modification du fichier d'initialisation
800
	[ -e /etc/init.d/chilli.default ] || cp /etc/init.d/chilli /etc/init.d/chilli.default
800
	[ -e /etc/init.d/chilli.default ] || cp /etc/init.d/chilli /etc/init.d/chilli.default
801
	# configuration d'eth1 (utile pour dnsmasq))
801
	# configuration d'eth1 (utile pour dnsmasq))
802
	$SED "s?ifconfig.*?ifconfig \$HS_LANIF $PRIVATE_IP?g" /etc/init.d/chilli
802
	$SED "s?ifconfig.*?ifconfig \$HS_LANIF $PRIVATE_IP?g" /etc/init.d/chilli
803
	# ajout de la fontion 'status' (utile pour la gestion du process)
803
	# ajout de la fonction 'status' (utile pour la gestion du process)
-
 
804
	$SED "/^.*functions/i. /etc/init.d/functions" /etc/init.d/chilli
804
	$SED "/^[\t ]*stop)/i\    status)\n        status chilli\n        RETVAL=$?\n        ;;\n" /etc/init.d/chilli
805
	$SED "/^[\t ]*stop)/i\    status)\n        status chilli\n        RETVAL=$?\n        ;;\n" /etc/init.d/chilli
805
	# insertion d'une tempo sur le 'restart' pour permettre à tun0 d'être libérée
806
	# insertion d'une tempo sur le 'restart' pour permettre à tun0 d'être libérée
806
	$SED "/^[\t ]*\$0 start/i\        sleep 2" /etc/init.d/chilli
807
	$SED "/^[\t ]*\$0 start/i\        sleep 2" /etc/init.d/chilli
-
 
808
	# suppression de warning disgracieux
-
 
809
	$SED "s?which start-stop-daemon?which start-stop-daemon 2>dev/null?g" /etc/init.d/chilli
807
# création du fichier de conf
810
# création du fichier de conf
808
	cp /etc/chilli/defaults /etc/chilli/config
811
	cp /etc/chilli/defaults /etc/chilli/config
809
	$SED "s?^# HS_WANIF=.*?HF_WANIF=$EXTIF?g" /etc/chilli/config
812
	$SED "s?^# HS_WANIF=.*?HF_WANIF=$EXTIF?g" /etc/chilli/config
810
	$SED "s?^HS_LANIF=.*?HS_LANIF=$INTIF?g" /etc/chilli/config
813
	$SED "s?^HS_LANIF=.*?HS_LANIF=$INTIF?g" /etc/chilli/config
811
	$SED "s?^HS_NETWORK=.*?HS_NETWORK=$PRIVATE_NETWORK?g" /etc/chilli/config
814
	$SED "s?^HS_NETWORK=.*?HS_NETWORK=$PRIVATE_NETWORK?g" /etc/chilli/config
Line 955... Line 958...
955
	$SED "s?^# PARENTPORT.*?PARENTPORT 3128?g" /etc/havp/havp.config
958
	$SED "s?^# PARENTPORT.*?PARENTPORT 3128?g" /etc/havp/havp.config
956
	$SED "s?^# PORT.*?PORT 8090?g" /etc/havp/havp.config
959
	$SED "s?^# PORT.*?PORT 8090?g" /etc/havp/havp.config
957
	$SED "s?^# BIND_ADDRESS.*?BIND_ADDRESS 127.0.0.1?g" /etc/havp/havp.config
960
	$SED "s?^# BIND_ADDRESS.*?BIND_ADDRESS 127.0.0.1?g" /etc/havp/havp.config
958
	$SED "s?^ENABLECLAMLIB.*?ENABLECLAMLIB true?g" /etc/havp/havp.config
961
	$SED "s?^ENABLECLAMLIB.*?ENABLECLAMLIB true?g" /etc/havp/havp.config
959
	$SED "s?^# LOG_OKS.*?LOG_OKS false?g" /etc/havp/havp.config
962
	$SED "s?^# LOG_OKS.*?LOG_OKS false?g" /etc/havp/havp.config
-
 
963
# modification du fichier d'initialisation
-
 
964
	[ -e /etc/init.d/havp.default ] || cp /etc/init.d/havp /etc/init.d/havp.default
-
 
965
	# ajout de la fonction 'status' (utile pour la gestion du process)
-
 
966
	$SED "/^.HAVP_BIN=/i. /etc/init.d/functions" /etc/init.d/havp
-
 
967
	$SED "s?^[\t ]*echo \"Checking for.*?status havp?g" /etc/init.d/havp
960
# mise à jour de la base antivirale de clamav toutes les 2 heures
968
# mise à jour de la base antivirale de clamav toutes les 2 heures
961
	$SED "s?^Checks.*?Checks 12?g" /etc/freshclam.conf
969
	$SED "s?^Checks.*?Checks 12?g" /etc/freshclam.conf
962
	$SED "s?^NotifyClamd.*?# NotifyClamd /etc/clamd.conf?g" /etc/freshclam.conf
970
	$SED "s?^NotifyClamd.*?# NotifyClamd /etc/clamd.conf?g" /etc/freshclam.conf
963
}
971
}
964
 
972