Subversion Repositories ALCASAR

Rev

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

Rev 838 Rev 840
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 838 2012-03-14 22:56:41Z richard $ 
2
#  $Id: alcasar.sh 840 2012-03-16 14:15:41Z 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 473... Line 473...
473
	$SED "s?\$DB_USER = .*?\$DB_USER = \"$DB_USER\"\;?g" $DIR_ACC/phpsysinfo/includes/xml/portail.php
473
	$SED "s?\$DB_USER = .*?\$DB_USER = \"$DB_USER\"\;?g" $DIR_ACC/phpsysinfo/includes/xml/portail.php
474
	$SED "s?\$radiuspwd = .*?\$radiuspwd = \"$radiuspwd\"\;?g" $DIR_ACC/phpsysinfo/includes/xml/portail.php
474
	$SED "s?\$radiuspwd = .*?\$radiuspwd = \"$radiuspwd\"\;?g" $DIR_ACC/phpsysinfo/includes/xml/portail.php
475
	$SED "s?\$hostname =.*?\$hostname = \"$HOSTNAME\";?g" $DIR_WEB/index.php
475
	$SED "s?\$hostname =.*?\$hostname = \"$HOSTNAME\";?g" $DIR_WEB/index.php
476
	chmod 640 $DIR_ACC/phpsysinfo/includes/xml/portail.php
476
	chmod 640 $DIR_ACC/phpsysinfo/includes/xml/portail.php
477
	chown -R apache:apache $DIR_WEB/*
477
	chown -R apache:apache $DIR_WEB/*
478
	for i in system_backup base logs/firewall logs/httpd logs/squid ;
478
	for i in system_backup base logs/firewall logs/httpd logs/squid logs/security;
479
	do
479
	do
480
		[ -d $DIR_SAVE/$i ] || mkdir -p $DIR_SAVE/$i
480
		[ -d $DIR_SAVE/$i ] || mkdir -p $DIR_SAVE/$i
481
	done
481
	done
482
	chown -R root:apache $DIR_SAVE
482
	chown -R root:apache $DIR_SAVE
483
# Configuration et sécurisation php
483
# Configuration et sécurisation php
Line 935... Line 935...
935
include		$DIR_DEST_ETC/alcasar-uamallowed
935
include		$DIR_DEST_ETC/alcasar-uamallowed
936
include		$DIR_DEST_ETC/alcasar-uamdomain
936
include		$DIR_DEST_ETC/alcasar-uamdomain
937
EOF
937
EOF
938
# création du fichier d'allocation d'adresses IP statiques
938
# création du fichier d'allocation d'adresses IP statiques
939
	touch $DIR_DEST_ETC/alcasar-ethers
939
	touch $DIR_DEST_ETC/alcasar-ethers
940
# création des fichiers de sites, d'urls et d'adresses MAC de confiance
940
# create files for trusted domains and urls
941
	touch $DIR_DEST_ETC/alcasar-macallowed $DIR_DEST_ETC/alcasar-uamallowed $DIR_DEST_ETC/alcasar-uamdomain
941
	touch $DIR_DEST_ETC/alcasar-uamallowed $DIR_DEST_ETC/alcasar-uamdomain
942
	chown root:apache $DIR_DEST_ETC/alcasar-*
942
	chown root:apache $DIR_DEST_ETC/alcasar-*
943
	chmod 660 $DIR_DEST_ETC/alcasar-*
943
	chmod 660 $DIR_DEST_ETC/alcasar-*
944
# Configuration des fichier WEB d'interception (secret partagé avec coova-chilli et nom d'organisme)
944
# Configuration des fichier WEB d'interception (secret partagé avec coova-chilli et nom d'organisme)
945
	$SED "s?^\$uamsecret =.*?\$uamsecret = \"$secretuam\";?g" $DIR_WEB/intercept.php
945
	$SED "s?^\$uamsecret =.*?\$uamsecret = \"$secretuam\";?g" $DIR_WEB/intercept.php
946
	$SED "s?^\$userpassword=1.*?\$userpassword=1;?g" $DIR_WEB/intercept.php
946
	$SED "s?^\$userpassword=1.*?\$userpassword=1;?g" $DIR_WEB/intercept.php