Subversion Repositories ALCASAR

Rev

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

Rev 1056 Rev 1617
Line 1... Line 1...
1
#/bin/bash
1
#/bin/bash
2
# $Id: alcasar-https.sh 1056 2013-03-26 21:46:36Z stephane $
2
# $Id: alcasar-https.sh 1617 2015-04-14 10:38:20Z 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 26... Line 26...
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/intercept.php?" $CHILLI_CONF_FILE
31
		/etc/init.d/chilli restart
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/intercept.php?" $CHILLI_CONF_FILE
36
		/etc/init.d/chilli restart
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"
41
		exit 1
41
		exit 1