Subversion Repositories ALCASAR

Rev

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

Rev 2332 Rev 2409
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-conf.sh 2332 2017-07-11 14:49:59Z tom.houdayer $
2
# $Id: alcasar-conf.sh 2409 2017-09-14 18:52:54Z tom.houdayer $
3
 
3
 
4
# alcasar-conf.sh
4
# alcasar-conf.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 170... Line 170...
170
		HTTPS_LOGIN=`grep -c "^HTTPS_LOGIN=" $CONF_FILE`
170
		HTTPS_LOGIN=`grep -c "^HTTPS_LOGIN=" $CONF_FILE`
171
		if [ $HTTPS_LOGIN == "0" ]
171
		if [ $HTTPS_LOGIN == "0" ]
172
		then
172
		then
173
			echo "HTTPS_LOGIN=on" >> $CONF_FILE
173
			echo "HTTPS_LOGIN=on" >> $CONF_FILE
174
		fi
174
		fi
-
 
175
# V3.2.0
-
 
176
	# add "HTTPS_CHILLI=off" in conf file
-
 
177
		if [ $(grep -c "^HTTPS_CHILLI=" $CONF_FILE) == "0" ]; then
-
 
178
			echo "HTTPS_CHILLI=off" >> $CONF_FILE
-
 
179
		fi
175
		;;
180
		;;
176
	--apply|-apply)
181
	--apply|-apply)
177
		PTN="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/([012]?[0-9]|3[0-2])\b"
182
		PTN="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/([012]?[0-9]|3[0-2])\b"
178
		PRIVATE_IP_MASK=`grep ^PRIVATE_IP $CONF_FILE|cut -d"=" -f2`
183
		PRIVATE_IP_MASK=`grep ^PRIVATE_IP $CONF_FILE|cut -d"=" -f2`
179
		check=$(echo $PRIVATE_IP_MASK | egrep $PTN)
184
		check=$(echo $PRIVATE_IP_MASK | egrep $PTN)