Subversion Repositories ALCASAR

Rev

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

Rev 1617 Rev 1803
Line 1... Line 1...
1
#/bin/bash
1
#/bin/bash
2
# $Id: alcasar-https.sh 1617 2015-04-14 10:38:20Z richard $
2
# $Id: alcasar-https.sh 1803 2016-02-29 21:30:57Z richard $
3
 
3
 
4
# alcasar-dhcp.sh
4
# alcasar-dhcp.sh
5
# by Rexy
5
# by Rexy
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 25... Line 25...
25
		echo "$usage"
25
		echo "$usage"
26
		exit 0
26
		exit 0
27
		;;
27
		;;
28
	--off|-off) # disable HTTPS 
28
	--off|-off) # disable HTTPS 
29
		$SED "/# If https not use/,/}/s?^?#?" $INTERCEPT_FILE
29
		$SED "/# If https not use/,/}/s?^?#?" $INTERCEPT_FILE
30
		$SED "s?uamserver.*?uamserver\thttp://alcasar/intercept.php?" $CHILLI_CONF_FILE
30
		$SED "s?uamserver.*?uamserver\thttp://alcasar.localdomain/intercept.php?" $CHILLI_CONF_FILE
31
		/usr/bin/systemctl restart chilli
31
		/usr/bin/systemctl restart chilli
32
		;;
32
		;;
33
	--on|-on) # enable HTTPS
33
	--on|-on) # enable HTTPS
34
		$SED "/## If https not use/,/#}/s?^#??" $INTERCEPT_FILE
34
		$SED "/## If https not use/,/#}/s?^#??" $INTERCEPT_FILE
35
		$SED "s?uamserver.*?uamserver\thttps://alcasar/intercept.php?" $CHILLI_CONF_FILE
35
		$SED "s?uamserver.*?uamserver\thttps://alcasar.localdomain/intercept.php?" $CHILLI_CONF_FILE
36
		/usr/bin/systemctl restart chilli
36
		/usr/bin/systemctl restart chilli
37
		;;
37
		;;
38
	*)
38
	*)
39
		echo "Argument inconnu :$1";
39
		echo "Argument inconnu :$1";
40
		echo "$usage"
40
		echo "$usage"