Subversion Repositories ALCASAR

Rev

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

Rev 2937 Rev 2938
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 2937 2021-04-05 22:17:52Z rexy $
2
#  $Id: alcasar.sh 2938 2021-04-06 22:17:19Z 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 1418... Line 1418...
1418
		cat << EOF >> /etc/ulogd-$log_type.conf
1418
		cat << EOF >> /etc/ulogd-$log_type.conf
1419
[emu1]
1419
[emu1]
1420
file="/var/log/firewall/$log_type.log"
1420
file="/var/log/firewall/$log_type.log"
1421
sync=1
1421
sync=1
1422
EOF
1422
EOF
1423
		$SED "s?^ExecStart=.*?ExecStart=/usr/sbin/ulogd -u ulogd -c /etc/ulogd-$log_type.conf $ULOGD_OPTIONS?g" /etc/systemd/system/ulogd-$log_type.service
1423
		$SED "s?^ExecStart=.*?ExecStart=/usr/sbin/ulogd -c /etc/ulogd-$log_type.conf $ULOGD_OPTIONS?g" /etc/systemd/system/ulogd-$log_type.service
1424
		nl=`expr $nl + 1`
1424
		nl=`expr $nl + 1`
1425
	done
1425
	done
1426
	chown -R root:apache /var/log/firewall
1426
	chown -R root:apache /var/log/firewall
1427
	chmod 750 /var/log/firewall
1427
	chmod 750 /var/log/firewall
1428
	chmod 640 /var/log/firewall/*
1428
	chmod 640 /var/log/firewall/*
Line 1479... Line 1479...
1479
	$SED "s?^DatabaseDir.*?DatabaseDir /var/log/vnstat?g" /etc/vnstat.conf
1479
	$SED "s?^DatabaseDir.*?DatabaseDir /var/log/vnstat?g" /etc/vnstat.conf
1480
	$SED "s?^MaxBandwidth.*?MaxBandwidth 10000?g" /etc/vnstat.conf
1480
	$SED "s?^MaxBandwidth.*?MaxBandwidth 10000?g" /etc/vnstat.conf
1481
	# vnstat-dashboard
1481
	# vnstat-dashboard
1482
	$SED "s?^\$thisInterface.*?\$thisInterface = \"$EXTIF\";?" $DIR_ACC/manager/vnstat/index.php
1482
	$SED "s?^\$thisInterface.*?\$thisInterface = \"$EXTIF\";?" $DIR_ACC/manager/vnstat/index.php
1483
	cp /lib/systemd/system/vnstat.service /etc/systemd/system/vnstat.service
1483
	cp /lib/systemd/system/vnstat.service /etc/systemd/system/vnstat.service
1484
	$SED "s?^PIDFILE=.*?PIDFILE=/run/vnstat/vnstat.pid?g" /etc/systemd/system/vnstat.service
1484
	$SED "s?^PIDFile=.*?PIDFile=/run/vnstat/vnstat.pid?g" /etc/systemd/system/vnstat.service
1485
} # End of vnstat()
1485
} # End of vnstat()
1486
 
1486
 
1487
###################################################################
1487
###################################################################
1488
##                     Function "dnsmasq"                        ##
1488
##                     Function "dnsmasq"                        ##
1489
## - creation of the conf files of dnsmasq (whitelist for ipset )##
1489
## - creation of the conf files of dnsmasq (whitelist for ipset )##