Subversion Repositories ALCASAR

Rev

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

Rev 2814 Rev 2815
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 2814 2020-04-27 22:02:20Z rexy $
2
#  $Id: alcasar.sh 2815 2020-05-03 22:10:04Z rexy $
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
5
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (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
#  team@alcasar.net
7
#  team@alcasar.net
Line 780... Line 780...
780
	[ -d $DIR_WEB ] && rm -rf $DIR_WEB
780
	[ -d $DIR_WEB ] && rm -rf $DIR_WEB
781
	mkdir $DIR_WEB
781
	mkdir $DIR_WEB
782
# Copy & adapt ACC files
782
# Copy & adapt ACC files
783
	cp -rf $DIR_INSTALL/web/* $DIR_WEB/
783
	cp -rf $DIR_INSTALL/web/* $DIR_WEB/
784
	$SED "s?99/99/9999?$DATE_SHORT?g" $DIR_ACC/menu.php
784
	$SED "s?99/99/9999?$DATE_SHORT?g" $DIR_ACC/menu.php
785
	# Waiting for new phpsysinfo special page
-
 
786
	#$SED "s?\$DB_RADIUS = .*?\$DB_RADIUS = \"$DB_RADIUS\"\;?g" $DIR_ACC/phpsysinfo/includes/xml/portail.php
785
	$SED "s?\$DB_RADIUS = .*?\$DB_RADIUS = \"$DB_RADIUS\"\;?g" $DIR_ACC/welcome.php
787
	#$SED "s?\$DB_USER = .*?\$DB_USER = \"$DB_USER\"\;?g" $DIR_ACC/phpsysinfo/includes/xml/portail.php
786
	$SED "s?\$DB_USER = .*?\$DB_USER = \"$DB_USER\"\;?g" $DIR_ACC/welcome.php
788
	#$SED "s?\$radiuspwd = .*?\$radiuspwd = \"$radiuspwd\"\;?g" $DIR_ACC/phpsysinfo/includes/xml/portail.php
787
	$SED "s?\$radiuspwd = .*?\$radiuspwd = \"$radiuspwd\"\;?g" $DIR_ACC/welcome.php
789
	#chmod 640 $DIR_ACC/phpsysinfo/includes/xml/portail.php
-
 
790
	chown -R apache:apache $DIR_WEB/*
788
	chown -R apache:apache $DIR_WEB/*
791
# copy & adapt "freeradius-web" files
789
# copy & adapt "freeradius-web" files
792
	cp -rf $DIR_CONF/freeradius-web/ /etc/
790
	cp -rf $DIR_CONF/freeradius-web/ /etc/
793
	[ -e /etc/freeradius-web/admin.conf.default ] || cp /etc/freeradius-web/admin.conf /etc/freeradius-web/admin.conf.default
791
	[ -e /etc/freeradius-web/admin.conf.default ] || cp /etc/freeradius-web/admin.conf /etc/freeradius-web/admin.conf.default
794
	$SED "s?^general_domain:.*?general_domain: $DOMAIN?g" /etc/freeradius-web/admin.conf
792
	$SED "s?^general_domain:.*?general_domain: $DOMAIN?g" /etc/freeradius-web/admin.conf