Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

Rev Author Line No. Line
2745 rexy 1
# june 2019 - due to an update of freeradius, the conf files have been reset
2
# This patch create again the ALCASAR conf for freeradius
3
 
4
CONF_FILE="/usr/local/etc/alcasar.conf"
5
current_version=`grep ^VERSION= $CONF_FILE |cut -d"=" -f2`
6
maj_version=`echo $current_version|cut -d"." -f1`
7
min_version=`echo $current_version|cut -d"." -f2`
8
 
9
if [ $maj_version = "3" ] & [ $min_version = "3" ]
10
then
11
# Add ALCASAR & Coovachilli dictionaries
12
	echo "ALCASAR version 3.3"
13
	cp /usr/share/freeradius/dictionary.alcasar /etc/raddb
14
	cp /usr/share/freeradius/dictionary.coovachilli /etc/raddb
15
	[ -e /etc/raddb/dictionary.default ] || cp /etc/raddb/dictionary /etc/raddb/dictionary.default
16
	echo '$INCLUDE dictionary.alcasar' > /etc/raddb/dictionary
17
	echo '$INCLUDE dictionary.coovachilli' >> /etc/raddb/dictionary
18
elif [ $maj_version = "3" ] & [ $min_version = "2" ]
19
then
20
	echo "ALCASAR version 3.2"
21
	rm -f /etc/raddb/dictionary.alcasar
22
	rm -f /etc/raddb/dictionary.coovachilli
23
	[ -e /etc/raddb/dictionary.default ] && mv /etc/raddb/dictionary.default /etc/raddb/dictionary
24
fi
25
# Set only usefull modules for ALCASAR (! the module 'ldap-alcasar' is enabled only via ACC)
26
	rm -rf  /etc/raddb/mods-enabled/*
27
	for mods in sql sqlcounter attr_filter expiration logintime pap expr always
28
	do
29
		ln -s /etc/raddb/mods-available/$mods /etc/raddb/mods-enabled/$mods
30
	done
31
# Set Virtual server (remvove all except "alcasar virtual site")
32
	rm -f /etc/raddb/sites-enabled/*
33
	ln -s /etc/raddb/sites-available/alcasar /etc/raddb/sites-enabled/alcasar
34
	systemctl start radiusd.service
35
	/usr/local/bin/alcasar-daemon.sh