Subversion Repositories ALCASAR

Rev

Rev 845 | Rev 854 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 845 Rev 847
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 845 2012-03-29 21:17:03Z richard $ 
2
#  $Id: alcasar.sh 847 2012-03-30 22:01:21Z richard $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
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 948... Line 948...
948
	touch $DIR_DEST_ETC/alcasar-ethers
948
	touch $DIR_DEST_ETC/alcasar-ethers
949
# create files for trusted domains and urls
949
# create files for trusted domains and urls
950
	touch $DIR_DEST_ETC/alcasar-uamallowed $DIR_DEST_ETC/alcasar-uamdomain
950
	touch $DIR_DEST_ETC/alcasar-uamallowed $DIR_DEST_ETC/alcasar-uamdomain
951
	chown root:apache $DIR_DEST_ETC/alcasar-*
951
	chown root:apache $DIR_DEST_ETC/alcasar-*
952
	chmod 660 $DIR_DEST_ETC/alcasar-*
952
	chmod 660 $DIR_DEST_ETC/alcasar-*
953
# Configuration des fichier WEB d'interception (secret partagé avec coova-chilli et nom d'organisme)
953
# Configuration des fichier WEB d'interception (secret partagé avec coova-chilli)
954
	$SED "s?^\$uamsecret =.*?\$uamsecret = \"$secretuam\";?g" $DIR_WEB/intercept.php
954
	$SED "s?^\$uamsecret =.*?\$uamsecret = \"$secretuam\";?g" $DIR_WEB/intercept.php
955
	$SED "s?^\$userpassword=1.*?\$userpassword=1;?g" $DIR_WEB/intercept.php
955
	$SED "s?^\$userpassword=1.*?\$userpassword=1;?g" $DIR_WEB/intercept.php
956
	$SED "s?^\$organisme = .*?\$organisme = \"$ORGANISME\";?g" $DIR_WEB/intercept.php $DIR_WEB/status.php
-
 
957
# user 'chilli' creation (in order to run conup/off and up/down scripts
956
# user 'chilli' creation (in order to run conup/off and up/down scripts
958
	chilli_exist=`grep chilli /etc/passwd|wc -l`
957
	chilli_exist=`grep chilli /etc/passwd|wc -l`
959
	if [ "$chilli_exist" == "1" ]
958
	if [ "$chilli_exist" == "1" ]
960
	then
959
	then
961
	      userdel -r chilli 2>/dev/null
960
	      userdel -r chilli 2>/dev/null