Subversion Repositories ALCASAR

Rev

Rev 247 | 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 393 2011-01-02 10:00:53Z franck $
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 
393 franck 9
 
71 richard 10
SED="/bin/sed -i"
393 franck 11
usage="Usage: alcasar-havp.sh {--on or -on} | {--off or -off} | {--update or -update}"
71 richard 12
nb_args=$#
13
args=$1
14
if [ $nb_args -eq 0 ]
15
then
16
	nb_args=1
17
	args="-h"
18
fi
19
case $args in
20
	-\? | -h* | --h*)
21
		echo "$usage"
22
		exit 0
23
		;;
393 franck 24
	--on|-on)	
71 richard 25
		# activation havp
26
		$SED "s/^proxyport =.*/proxyport = 8090/g" /etc/dansguardian/dansguardian.conf
27
		service dansguardian reload
28
		service havp start
29
		;;
393 franck 30
	--off|-off)
71 richard 31
		# désactivation du filtrage
32
		$SED "s/^proxyport =.*/proxyport = 3128/g" /etc/dansguardian/dansguardian.conf
33
		service dansguardian reload
34
		service havp stop
35
		;;
393 franck 36
	--update|-update)
71 richard 37
		#mise à jour de la base de signature
38
		freshclam
39
		;;		
40
	*)
41
		echo "Argument inconnu :$1";
42
		echo "$usage"
43
		exit 1
44
		;;
45
esac
46