Subversion Repositories ALCASAR

Rev

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

Rev 2864 Rev 2865
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 2864 2020-10-18 09:06:17Z rexy $
2
#  $Id: alcasar.sh 2865 2020-10-18 22:21:46Z 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 1364... Line 1364...
1364
[ -e /etc/clamd.conf.default ] || cp /etc/clamd.conf /etc/clamd.conf.default
1364
[ -e /etc/clamd.conf.default ] || cp /etc/clamd.conf /etc/clamd.conf.default
1365
	$SED "s?^MaxThreads.*?MaxThreads 32?g" /etc/clamd.conf
1365
	$SED "s?^MaxThreads.*?MaxThreads 32?g" /etc/clamd.conf
1366
	$SED "s?^#LogTime.*?LogTime yes?g" /etc/clamd.conf # enable logtime for each message
1366
	$SED "s?^#LogTime.*?LogTime yes?g" /etc/clamd.conf # enable logtime for each message
1367
	$SED "s?^LogVerbose.*?LogVerbose no?g" /etc/clamd.conf
1367
	$SED "s?^LogVerbose.*?LogVerbose no?g" /etc/clamd.conf
1368
	$SED "s?^#LogRotate.*?LogRotate yes?g" /etc/clamd.conf
1368
	$SED "s?^#LogRotate.*?LogRotate yes?g" /etc/clamd.conf
-
 
1369
	$SED "s?^User.*?User e2guardian?g" /etc/clamd.conf
-
 
1370
	$SED "s?^TemporaryDirectory.*?TemporaryDirectory /var/lib/e2guardian/tmp?g" /etc/clamd.conf
1369
	chown -R clamav:clamav /var/log/clamav /var/lib/clamav
1371
	chown -R e2guardian:e2guardian /var/log/clamav /var/lib/clamav
1370
	chmod 775 /var/log/clamav /var/lib/clamav
1372
	chmod 775 /var/log/clamav /var/lib/clamav
1371
	chmod 664 /var/log/clamav/*
1373
	chmod 664 /var/log/clamav/*
1372
# update virus database every 4 hours (24h/6)
1374
# update virus database every 4 hours (24h/6)
1373
	[ -e /etc/freshclam.conf.default ] || cp /etc/freshclam.conf /etc/freshclam.conf.default
1375
	[ -e /etc/freshclam.conf.default ] || cp /etc/freshclam.conf /etc/freshclam.conf.default
1374
	$SED "s?^Checks.*?Checks 6?g" /etc/freshclam.conf
1376
	$SED "s?^Checks.*?Checks 6?g" /etc/freshclam.conf
1375
	$SED "s?^NotifyClamd.*?# NotifyClamd /etc/clamd.conf?g" /etc/freshclam.conf
1377
	$SED "s?^NotifyClamd.*?# NotifyClamd /etc/clamd.conf?g" /etc/freshclam.conf
-
 
1378
	$SED "s?^DatabaseOwner.*?DatabaseOwner e2guardian?g" /etc/freshclam.conf
1376
	$SED "/^DatabaseMirror/a DatabaseMirror db.fr.clamav.net" /etc/freshclam.conf
1379
	$SED "/^DatabaseMirror/a DatabaseMirror db.fr.clamav.net" /etc/freshclam.conf
1377
	$SED "s?^MaxAttempts.*?MaxAttempts 3?g" /etc/freshclam.conf
1380
	$SED "s?^MaxAttempts.*?MaxAttempts 3?g" /etc/freshclam.conf
1378
# update now
1381
# update now
1379
	/usr/bin/freshclam --no-warnings --quiet
1382
	/usr/bin/freshclam --no-warnings --quiet
1380
} # End of antivirus()
1383
} # End of antivirus()
Line 1961... Line 1964...
1961
/etc/pki/CA/*                           root.apache     640 force 
1964
/etc/pki/CA/*                           root.apache     640 force 
1962
/etc/pki/CA/private/                    root.root       700 force
1965
/etc/pki/CA/private/                    root.root       700 force
1963
/etc/pki/CA/private/*                   root.root       600 force
1966
/etc/pki/CA/private/*                   root.root       600 force
1964
/etc/pki/tls/private/                   root.apache     750 force
1967
/etc/pki/tls/private/                   root.apache     750 force
1965
/etc/pki/tls/private/*                  root.apache     640 force
1968
/etc/pki/tls/private/*                  root.apache     640 force
1966
/var/log/clamav/                        clamav.clamav   755 force
1969
/var/log/clamav/                        e2guardian.e2guardian   755 force
1967
/var/log/clamav/*                       clamav.clamav   764 force
1970
/var/log/clamav/*                       e2guardian.e2guardian   764 force
1968
/var/lib/clamav/                        clamav.clamav   755 force
1971
/var/lib/clamav/                        e2guardian.e2guardian   755 force
1969
EOF
1972
EOF
1970
# apply now hourly & daily checks
1973
# apply now hourly & daily checks
1971
/usr/sbin/msec
1974
/usr/sbin/msec
1972
/etc/cron.weekly/msec
1975
/etc/cron.weekly/msec
1973
 
1976