Subversion Repositories ALCASAR

Rev

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

Rev 2470 Rev 2474
Line 12... Line 12...
12
CONF_FILE="/usr/local/etc/alcasar.conf"
12
CONF_FILE="/usr/local/etc/alcasar.conf"
13
LDAP_MODULE="/etc/raddb/mods-available/ldap-alcasar"
13
LDAP_MODULE="/etc/raddb/mods-available/ldap-alcasar"
14
LDAP_SERVER=`grep ^LDAP_SERVER= $CONF_FILE|cut -d"=" -f2`		# IP address of the LDAP server
14
LDAP_SERVER=`grep ^LDAP_SERVER= $CONF_FILE|cut -d"=" -f2`		# IP address of the LDAP server
15
LDAP_BASE=`grep ^LDAP_BASE= $CONF_FILE|cut -d"=" -f2-`			# Where to find the users (cn=**,dc=**,dc=**)
15
LDAP_BASE=`grep ^LDAP_BASE= $CONF_FILE|cut -d"=" -f2-`			# Where to find the users (cn=**,dc=**,dc=**)
16
LDAP_UID=`grep ^LDAP_UID= $CONF_FILE|cut -d"=" -f2`				# 'samaccuntname' for A.D. - 'UID' for LDAP
16
LDAP_UID=`grep ^LDAP_UID= $CONF_FILE|cut -d"=" -f2`				# 'samaccuntname' for A.D. - 'UID' for LDAP
17
LDAP_FILTER=`grep ^LDAP_FILTER= $CONF_FILE|cut -d"=" -f2`		# Filter to limit users search (not used for now)
17
LDAP_FILTER=`grep ^LDAP_FILTER= $CONF_FILE|cut -d"=" -f2-`		# Filter to limit users search (not used for now)
18
LDAP_USER=`grep ^LDAP_USER= $CONF_FILE|cut -d"=" -f2-`			# LDAP username used by ALCASAR to read the remote directory
18
LDAP_USER=`grep ^LDAP_USER= $CONF_FILE|cut -d"=" -f2-`			# LDAP username used by ALCASAR to read the remote directory
19
LDAP_PASSWORD=`grep ^LDAP_PASSWORD= $CONF_FILE|cut -d"=" -f2`	# its password
19
LDAP_PASSWORD=`grep ^LDAP_PASSWORD= $CONF_FILE|cut -d"=" -f2-`	# its password
20
nb_args=$#
20
nb_args=$#
21
args=$1
21
args=$1
22
if [ $nb_args -eq 0 ]
22
if [ $nb_args -eq 0 ]
23
then
23
then
24
	nb_args=1
24
	nb_args=1
Line 54... Line 54...
54
		then
54
		then
55
			rm /etc/raddb/sites-enabled/alcasar
55
			rm /etc/raddb/sites-enabled/alcasar
56
		fi
56
		fi
57
		ln -s /etc/raddb/sites-available/alcasar /etc/raddb/sites-enabled/alcasar
57
		ln -s /etc/raddb/sites-available/alcasar /etc/raddb/sites-enabled/alcasar
58
		/usr/bin/systemctl restart radiusd.service
58
		/usr/bin/systemctl restart radiusd.service
59
;;
59
		;;
60
	*)
60
	*)
61
		echo "Argument inconnu :$1";
61
		echo "Argument inconnu : $1";
62
		echo "$usage"
62
		echo "$usage"
63
		exit 1
63
		exit 1
64
		;;
64
		;;
65
esac
65
esac