Subversion Repositories ALCASAR

Rev

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

Rev 348 Rev 383
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: alcasar-bypass.sh 348 2010-11-29 21:24:26Z franck $
2
# $Id: alcasar-bypass.sh 383 2010-12-27 20:31:01Z franck $
3
 
3
 
4
# Script portail-bypass
4
# Script portail-bypass
5
# Permet d'activer ou de désactiver le contournement de l'authentification et du filtrage WEB
5
# Permet d'activer ou de désactiver le contournement de l'authentification et du filtrage WEB
6
usage="Usage: alcasar-bypass.sh -on | -off"
6
usage="Usage: alcasar-bypass.sh {--on or -on } | {--off or -off}"
7
nb_args=$#
7
nb_args=$#
8
args=$1
8
args=$1
9
if [ $nb_args -eq 0 ]
9
if [ $nb_args -eq 0 ]
10
then
10
then
11
	nb_args=1
11
	nb_args=1
Line 14... Line 14...
14
case $args in
14
case $args in
15
	-\? | -h* | --h*)
15
	-\? | -h* | --h*)
16
		echo "$usage"
16
		echo "$usage"
17
		exit 0
17
		exit 0
18
		;;
18
		;;
19
	-on)	
19
	--on | -on)	
20
		# activation du contournement
20
		# activation du contournement
21
		for i in chilli squid dansguardian httpd mysqld radiusd
21
		for i in chilli squid dansguardian httpd mysqld radiusd
22
		do
22
		do
23
			if  (pgrep $i) > /dev/null ; then /etc/init.d/$i stop ; fi
23
			if  (pgrep $i) > /dev/null ; then /etc/init.d/$i stop ; fi
24
		done
24
		done
Line 27... Line 27...
27
		sh /usr/local/bin/alcasar-iptables-bypass.sh
27
		sh /usr/local/bin/alcasar-iptables-bypass.sh
28
		if ! (pgrep dnsmasq)  > /dev/null ; then /etc/init.d/dnsmasq start ; fi
28
		if ! (pgrep dnsmasq)  > /dev/null ; then /etc/init.d/dnsmasq start ; fi
29
		echo "Le contournement du module d'authentification et de filtrage WEB est activé"
29
		echo "Le contournement du module d'authentification et de filtrage WEB est activé"
30
		echo "les journaux du parefeu continuent néanmoins d'être enregistrés"
30
		echo "les journaux du parefeu continuent néanmoins d'être enregistrés"
31
		;;
31
		;;
32
	-off)
32
	--off | -off)
33
		# désactivation du contournement
33
		# désactivation du contournement
34
		if (pgrep dnsmasq) > /dev/null ; then /etc/init.d/dnsmasq stop ; fi
34
		if (pgrep dnsmasq) > /dev/null ; then /etc/init.d/dnsmasq stop ; fi
35
		for i in chilli squid dansguardian httpd mysqld radiusd
35
		for i in chilli squid dansguardian httpd mysqld radiusd
36
		do
36
		do
37
			if  ! (pgrep $i) > /dev/null ; then /etc/init.d/$i start ; fi
37
			if  ! (pgrep $i) > /dev/null ; then /etc/init.d/$i start ; fi