Subversion Repositories ALCASAR

Rev

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

Rev Author Line No. Line
71 richard 1
#/bin/sh
393 franck 2
# $Id: alcasar-havp.sh 519 2011-03-25 16:30:32Z stephane $
3
 
4
# alcasar-havp.sh
5
# by Rexy
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
71 richard 8
# Gestion Havp / Clamav 
9
SED="/bin/sed -i"
393 franck 10
usage="Usage: alcasar-havp.sh {--on or -on} | {--off or -off} | {--update or -update}"
71 richard 11
nb_args=$#
12
args=$1
13
if [ $nb_args -eq 0 ]
14
then
15
	nb_args=1
16
	args="-h"
17
fi
18
case $args in
19
	-\? | -h* | --h*)
20
		echo "$usage"
21
		exit 0
22
		;;
393 franck 23
	--on|-on)	
71 richard 24
		# activation havp
25
		$SED "s/^proxyport =.*/proxyport = 8090/g" /etc/dansguardian/dansguardian.conf
26
		service dansguardian reload
27
		service havp start
28
		;;
393 franck 29
	--off|-off)
71 richard 30
		# désactivation du filtrage
31
		$SED "s/^proxyport =.*/proxyport = 3128/g" /etc/dansguardian/dansguardian.conf
32
		service dansguardian reload
33
		service havp stop
34
		;;
393 franck 35
	--update|-update)
71 richard 36
		#mise à jour de la base de signature
37
		freshclam
38
		;;		
39
	*)
40
		echo "Argument inconnu :$1";
41
		echo "$usage"
42
		exit 1
43
		;;
44
esac
45