Subversion Repositories ALCASAR

Rev

Rev 2979 | Rev 2981 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 2979 Rev 2980
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 2979 2021-07-22 20:14:04Z rexy $
2
#  $Id: alcasar.sh 2980 2021-07-22 22:31:38Z rexy $
3
 
3
 
4
# ALCASAR is a Free and open source NAC (Network Access Controler) created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
4
# ALCASAR is a Free and open source NAC (Network Access Controler) created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
5
# ALCASAR is based on a stripped Mageia (LSB) with the following open source softwares Coovachilli, freeradius, mariaDB, lighttpd, php, netfilter, e2guardian, ntpd, openssl, dnsmasq, unbound, gammu, clamav, Ulog, fail2ban, vnstat, wkhtml2pdf, ipt_NETFLOW, NFsen and NFdump
5
# ALCASAR is based on a stripped Mageia (LSB) with the following open source softwares Coovachilli, freeradius, mariaDB, lighttpd, php, netfilter, e2guardian, ntpd, openssl, dnsmasq, unbound, gammu, clamav, Ulog, fail2ban, vnstat, wkhtml2pdf, ipt_NETFLOW, NFsen and NFdump
6
# contact : info@alcasar.net
6
# contact : info@alcasar.net
7
 
7
 
Line 1416... Line 1416...
1416
	$SED "s?^Checks.*?Checks 6?g" /etc/freshclam.conf
1416
	$SED "s?^Checks.*?Checks 6?g" /etc/freshclam.conf
1417
	$SED "s?^NotifyClamd.*?# NotifyClamd /etc/clamd.conf?g" /etc/freshclam.conf
1417
	$SED "s?^NotifyClamd.*?# NotifyClamd /etc/clamd.conf?g" /etc/freshclam.conf
1418
	$SED "s?^DatabaseOwner.*?DatabaseOwner e2guardian?g" /etc/freshclam.conf
1418
	$SED "s?^DatabaseOwner.*?DatabaseOwner e2guardian?g" /etc/freshclam.conf
1419
	$SED "/^DatabaseMirror/a DatabaseMirror db.fr.clamav.net" /etc/freshclam.conf
1419
	$SED "/^DatabaseMirror/a DatabaseMirror db.fr.clamav.net" /etc/freshclam.conf
1420
	$SED "s?^MaxAttempts.*?MaxAttempts 3?g" /etc/freshclam.conf
1420
	$SED "s?^MaxAttempts.*?MaxAttempts 3?g" /etc/freshclam.conf
-
 
1421
	# update now
-
 
1422
        /usr/bin/freshclam --no-warnings --quiet
1421
} # End of antivirus()
1423
} # End of antivirus()
1422
 
1424
 
1423
##############################################################
1425
##############################################################
1424
##                            function "ulogd"              ##
1426
##                            function "ulogd"              ##
1425
## - Ulog config for multi-log files                        ##
1427
## - Ulog config for multi-log files                        ##
Line 2395... Line 2397...
2395
		if [ $DEBUG_ALCASAR == "on" ]
2397
		if [ $DEBUG_ALCASAR == "on" ]
2396
		then
2398
		then
2397
			echo "*** 'debug' : end of cleaning ***"
2399
			echo "*** 'debug' : end of cleaning ***"
2398
			read
2400
			read
2399
		fi
2401
		fi
-
 
2402
# Avoid some RPM automatic updates
-
 
2403
		echo "/^kernel/" > /etc/urpmi/skip.list
-
 
2404
		echo "/^wkhtmltopdf/" >> /etc/urpmi/skip.list
-
 
2405
		echo "/^clamd/" >> /etc/urpmi/skip.list
-
 
2406
		echo "/^clamav/" >> /etc/urpmi/skip.list
-
 
2407
		echo "/^freeradius/" >> /etc/urpmi/skip.list
-
 
2408
		if [ `egrep '^exclude=' /etc/dnf/dnf.conf |wc -l` -eq "1" ]; then
-
 
2409
			$SED "s?^exclude=.*?exclude=kernel\* wkhtmltopdf clamd clamav freeradius?g" /etc/dnf/dnf.conf
-
 
2410
		else
-
 
2411
			echo "exclude=kernel* wkhtmltopdf clamd clamav freeradius" >> /etc/dnf/dnf.conf
-
 
2412
		fi
2400
# Test if conf file
2413
# Test if conf file
2401
		if [ -e /var/tmp/alcasar-conf.tar.gz ]
2414
		if [ -e /var/tmp/alcasar-conf.tar.gz ]
2402
		then
2415
		then
2403
# Extract some info from the previous configuration file
2416
# Extract some info from the previous configuration file
2404
			cd /var/tmp
2417
			cd /var/tmp