Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 2228 2017-05-15 04:42:19Z franck $
|
2 |
# $Id: alcasar.sh 2232 2017-05-17 11:22:12Z richard $
|
3 |
|
3 |
|
4 |
# alcasar.sh
|
4 |
# alcasar.sh
|
5 |
|
5 |
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
Line 1441... |
Line 1441... |
1441 |
## - install the nfsen grapher ##
|
1441 |
## - install the nfsen grapher ##
|
1442 |
## - install the two plugins porttracker & surfmap ##
|
1442 |
## - install the two plugins porttracker & surfmap ##
|
1443 |
##########################################################
|
1443 |
##########################################################
|
1444 |
nfsen()
|
1444 |
nfsen()
|
1445 |
{
|
1445 |
{
|
1446 |
tar xzf ./conf/nfsen/nfsen-1.3.8.tar.gz -C /tmp/
|
1446 |
tar xzf ./conf/nfsen/nfsen-1.3.7.tar.gz -C /tmp/
|
1447 |
# Add PortTracker plugin
|
1447 |
# Add PortTracker plugin
|
1448 |
for i in /var/www/html/acc/manager/nfsen/plugins /var/log/netflow/porttracker /usr/share/nfsen/plugins
|
1448 |
for i in /var/www/html/acc/manager/nfsen/plugins /var/log/netflow/porttracker /usr/share/nfsen/plugins
|
1449 |
do
|
1449 |
do
|
1450 |
[ ! -d $i ] && mkdir -p $i && chown -R apache:apache $i
|
1450 |
[ ! -d $i ] && mkdir -p $i && chown -R apache:apache $i
|
1451 |
done
|
1451 |
done
|
1452 |
$SED "s?^my \$PORTSDBDIR =.*?my \$PORTSDBDIR = \"/var/log/netflow/porttracker\";?g" /tmp/nfsen-1.3.8/contrib/PortTracker/PortTracker.pm
|
1452 |
$SED "s?^my \$PORTSDBDIR =.*?my \$PORTSDBDIR = \"/var/log/netflow/porttracker\";?g" /tmp/nfsen-1.3.7/contrib/PortTracker/PortTracker.pm
|
1453 |
# use of our conf file and init unit
|
1453 |
# use of our conf file and init unit
|
1454 |
cp $DIR_CONF/nfsen/nfsen.conf /tmp/nfsen-1.3.8/etc/
|
1454 |
cp $DIR_CONF/nfsen/nfsen.conf /tmp/nfsen-1.3.7/etc/
|
1455 |
# Installation of nfsen (we change a little 'install.pl in order not to ask the user for the perl version)
|
1455 |
# Installation of nfsen (we change a little 'install.pl in order not to ask the user for the perl version)
|
1456 |
DirTmp=$(pwd)
|
1456 |
DirTmp=$(pwd)
|
1457 |
cd /tmp/nfsen-1.3.8/
|
1457 |
cd /tmp/nfsen-1.3.7/
|
1458 |
/usr/bin/perl install.pl etc/nfsen.conf
|
1458 |
/usr/bin/perl install.pl etc/nfsen.conf
|
1459 |
/usr/bin/perl install.pl etc/nfsen.conf # to avoid a Perl mistake "Semaphore introuvable"
|
1459 |
/usr/bin/perl install.pl etc/nfsen.conf # to avoid a Perl mistake "Semaphore introuvable"
|
1460 |
# Create RRD DB for porttracker (only in it still doesn't exist)
|
1460 |
# Create RRD DB for porttracker (only in it still doesn't exist)
|
1461 |
cp contrib/PortTracker/PortTracker.pm /usr/share/nfsen/plugins/
|
1461 |
cp contrib/PortTracker/PortTracker.pm /usr/share/nfsen/plugins/
|
1462 |
cp contrib/PortTracker/PortTracker.php /var/www/html/acc/manager/nfsen/plugins/
|
1462 |
cp contrib/PortTracker/PortTracker.php /var/www/html/acc/manager/nfsen/plugins/
|