Subversion Repositories ALCASAR

Rev

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

Rev 2140 Rev 2171
Line 1... Line 1...
1
#/bin/bash
1
#/bin/bash
2
# $Id: alcasar-conf.sh 2140 2017-03-21 08:06:09Z richard $
2
# $Id: alcasar-conf.sh 2171 2017-04-21 17:39:13Z 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 21... Line 21...
21
DIR_BIN="/usr/local/bin"			# scripts directory
21
DIR_BIN="/usr/local/bin"			# scripts directory
22
DIR_ETC="/usr/local/etc"			# conf directory
22
DIR_ETC="/usr/local/etc"			# conf directory
23
DIR_SHARE="/usr/local/share"			# data directory
23
DIR_SHARE="/usr/local/share"			# data directory
24
DIR_BLACKLIST="/etc/dansguardian/lists/blacklists"	# Toulouse BL directory
24
DIR_BLACKLIST="/etc/dansguardian/lists/blacklists"	# Toulouse BL directory
25
CONF_FILE="$DIR_ETC/alcasar.conf"		# main alcasar conf file
25
CONF_FILE="$DIR_ETC/alcasar.conf"		# main alcasar conf file
26
VERSION="/var/www/html/VERSION"			# contient la version en cours
-
 
27
EXTIF=`grep ^EXTIF= $CONF_FILE|cut -d"=" -f2`	# EXTernal InterFace
26
EXTIF=`grep ^EXTIF= $CONF_FILE|cut -d"=" -f2`	# EXTernal InterFace
28
INTIF=`grep ^INTIF= $CONF_FILE|cut -d"=" -f2`	# INTernal InterFace
27
INTIF=`grep ^INTIF= $CONF_FILE|cut -d"=" -f2`	# INTernal InterFace
29
MTU=`grep ^PUBLIC_MTU= $CONF_FILE|cut -d"=" -f2` # INTernal InterFace
28
MTU=`grep ^PUBLIC_MTU= $CONF_FILE|cut -d"=" -f2` # INTernal InterFace
30
DHCP_mode=`grep ^DHCP= $CONF_FILE|cut -d"=" -f2`
29
DHCP_mode=`grep ^DHCP= $CONF_FILE|cut -d"=" -f2`
31
INT_DNS_mode=`grep ^INT_DNS_ACTIVE= $CONF_FILE|cut -d"=" -f2`
30
INT_DNS_mode=`grep ^INT_DNS_ACTIVE= $CONF_FILE|cut -d"=" -f2`
32
LDAP_mode=`grep ^LDAP= $CONF_FILE|cut -d"=" -f2`
31
LDAP_mode=`grep ^LDAP= $CONF_FILE|cut -d"=" -f2`
33
HOSTNAME="alcasar"
32
HOSTNAME="alcasar"
34
DB_USER="radius"
33
DB_USER="radius"
35
radiuspwd=""
34
radiuspwd=""
36
SED="/bin/sed -i"
35
SED="/bin/sed -i"
37
RUNNING_VERSION=`cat $VERSION|cut -d" " -f1`
36
RUNNING_VERSION=`grep ^VERSION /usr/local/etc/alcasar.conf|cut -d'=' -f2`
38
MAJ_RUNNING_VERSION=`echo $RUNNING_VERSION|cut -d"." -f1`
37
MAJ_RUNNING_VERSION=`echo $RUNNING_VERSION|cut -d"." -f1`
39
MIN_RUNNING_VERSION=`echo $RUNNING_VERSION|cut -d"." -f2|cut -c1`
38
MIN_RUNNING_VERSION=`echo $RUNNING_VERSION|cut -d"." -f2|cut -c1`
40
UPD_RUNNING_VERSION=`echo $RUNNING_VERSION|cut -d"." -f3`
39
UPD_RUNNING_VERSION=`echo $RUNNING_VERSION|cut -d"." -f3`
41
DOMAIN=`grep DOMAIN $CONF_FILE|cut -d"=" -f2` 2>/dev/null
40
DOMAIN=`grep DOMAIN $CONF_FILE|cut -d"=" -f2` 2>/dev/null
42
DNS1=`grep "DNS1" $CONF_FILE | cut -d '=' -f 2` 			# server DNS1 (for WL domain names)
41
DNS1=`grep "DNS1" $CONF_FILE | cut -d '=' -f 2` 			# server DNS1 (for WL domain names)