Subversion Repositories ALCASAR

Rev

Rev 71 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
71 richard 1
#/bin/sh
2
# Gestion Havp / Clamav 
3
SED="/bin/sed -i"
4
usage="Usage: alcasar-havp.sh -on | -off | -update"
5
nb_args=$#
6
args=$1
7
if [ $nb_args -eq 0 ]
8
then
9
	nb_args=1
10
	args="-h"
11
fi
12
case $args in
13
	-\? | -h* | --h*)
14
		echo "$usage"
15
		exit 0
16
		;;
17
	-on)	
18
		# activation havp
19
		$SED "s/^proxyport =.*/proxyport = 8090/g" /etc/dansguardian/dansguardian.conf
20
		service dansguardian reload
21
		service havp start
22
		;;
23
	-off)
24
		# désactivation du filtrage
25
		$SED "s/^proxyport =.*/proxyport = 3128/g" /etc/dansguardian/dansguardian.conf
26
		service dansguardian reload
27
		service havp stop
28
		;;
29
	-update)
30
		#mise à jour de la base de signature
31
		freshclam
32
		;;		
33
	*)
34
		echo "Argument inconnu :$1";
35
		echo "$usage"
36
		exit 1
37
		;;
38
esac
39