Subversion Repositories ALCASAR

Rev

Rev 1056 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1056 Rev 1258
Line 1... Line 1...
1
#/bin/bash
1
#/bin/bash
2
# $Id: alcasar-qos.sh 1056 2013-03-26 21:46:36Z stephane $
2
# $Id: alcasar-qos.sh 1258 2013-12-04 21:51:29Z franck $
3
 
3
 
4
# alcasar-CA.sh
4
# alcasar-CA.sh
5
# by Franck BOUIJOUX
5
# by Franck BOUIJOUX
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 24... Line 24...
24
		echo "$usage"
24
		echo "$usage"
25
		exit 0
25
		exit 0
26
		;;
26
		;;
27
	--on|-on)	
27
	--on|-on)	
28
		# activation du filtrage réseau
28
		# activation du filtrage réseau
29
		if [ -e $FIC_QOS ] then 
29
		if [ -e $FIC_QOS ] 
-
 
30
		then 
30
			$SED "s?^QOS.*?QOS=\"yes\"?g" /usr/local/bin/alcasar-iptables.sh
31
			$SED "s?^QOS.*?QOS=\"on\"?g" /usr/local/bin/alcasar-iptables.sh
31
		/usr/local/bin/alcasar-iptables.sh
32
			/usr/local/bin/alcasar-iptables.sh
32
		else	
33
		else	
33
			exit 2
34
			exit 2
34
		fi
35
		fi
35
		;;
36
		;;
36
	--off|-off)
37
	--off|-off)
37
		# désactivation du filtrage réseau
38
		# désactivation du filtrage réseau
38
		$SED "s?^QOS.*?QOS=\"no\"?g" /usr/local/bin/alcasar-iptables.sh
39
		$SED "s?^QOS.*?QOS=\"off\"?g" /usr/local/bin/alcasar-iptables.sh
39
		/usr/local/bin/alcasar-iptables.sh
40
		/usr/local/bin/alcasar-iptables.sh
40
		;;
41
		;;
41
	*)
42
	*)
42
		echo "Argument inconnu :$1";
43
		echo "Argument inconnu :$1";
43
		echo "$usage"
44
		echo "$usage"