Subversion Repositories ALCASAR

Rev

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

Rev 2764 Rev 2767
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 2764 2019-11-11 23:07:44Z rexy $
2
#  $Id: alcasar.sh 2767 2019-11-22 16:33:55Z 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 1502... Line 1502...
1502
# use of our conf file and init unit
1502
# use of our conf file and init unit
1503
	cp $DIR_CONF/nfsen/nfsen.conf /tmp/nfsen-*/etc/
1503
	cp $DIR_CONF/nfsen/nfsen.conf /tmp/nfsen-*/etc/
1504
# Installation of nfsen (we change a little 'install.pl in order not to ask the user for the perl version)
1504
# Installation of nfsen (we change a little 'install.pl in order not to ask the user for the perl version)
1505
	DirTmp=$(pwd)
1505
	DirTmp=$(pwd)
1506
	cd /tmp/nfsen-*/ || { echo "Unable to find nfsen directory"; exit 1; }
1506
	cd /tmp/nfsen-*/ || { echo "Unable to find nfsen directory"; exit 1; }
1507
	/usr/bin/perl install.pl etc/nfsen.conf
1507
	/usr/bin/perl install.pl /tmp/nfsen-*/etc/nfsen.conf
1508
	/usr/bin/perl install.pl etc/nfsen.conf # to avoid a Perl mistake "Semaphore introuvable"
1508
	/usr/bin/perl install.pl /tmp/nfsen-*/etc/nfsen.conf # to avoid a Perl mistake "Semaphore introuvable"
1509
# Create RRD DB for porttracker (only in it still doesn't exist)
1509
# Create RRD DB for porttracker (only in it still doesn't exist)
1510
	cp contrib/PortTracker/PortTracker.pm /usr/share/nfsen/plugins/
1510
	cp contrib/PortTracker/PortTracker.pm /usr/share/nfsen/plugins/
1511
	cp contrib/PortTracker/PortTracker.php /var/www/html/acc/manager/nfsen/plugins/
1511
	cp contrib/PortTracker/PortTracker.php /var/www/html/acc/manager/nfsen/plugins/
1512
	if [ "$(ls -A "/var/log/netflow/porttracker" 2>&1)" = "" ]; then sudo -u apache nftrack -I -d /var/log/netflow/porttracker; else echo "RRD DB already exists"; fi
1512
	if [ "$(ls -A "/var/log/netflow/porttracker" 2>&1)" = "" ]; then sudo -u apache nftrack -I -d /var/log/netflow/porttracker; else echo "RRD DB already exists"; fi
1513
	chmod -R 770 /var/log/netflow/porttracker
1513
	chmod -R 770 /var/log/netflow/porttracker