https://github.com/lisenet/clamav-daily
Automate ClamAV to perform daily system scans and send email notifications.
https://github.com/lisenet/clamav-daily
Last synced: 7 months ago
JSON representation
Automate ClamAV to perform daily system scans and send email notifications.
- Host: GitHub
- URL: https://github.com/lisenet/clamav-daily
- Owner: lisenet
- License: bsd-3-clause
- Created: 2014-10-13T13:55:08.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2022-01-25T15:45:36.000Z (over 3 years ago)
- Last Synced: 2025-03-15T02:45:01.794Z (7 months ago)
- Language: Shell
- Homepage:
- Size: 16.6 KB
- Stars: 39
- Watchers: 8
- Forks: 18
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
clamav-daily
============ClamAV is an open source (GPL) antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats.
Rkhunter (Rootkit Hunter) is a Unix-based tool that scans for rootkits, backdoors and possible local exploits.
The script scans pre-defined system locations depending on the day of the week and sends an email notification with a ClamAV or rkhunter log attached if any malware has been found.
# Installation on Debian/Ubuntu
The following packages are used by the script:
* ClamAV
* bsd-mailx
* Rkhunter
To install:```
$ sudo apt-get install clamav clamav-freshclam bsd-mailx rkhunter git
$ git clone https://github.com/lisenet/clamav-daily.git
$ chmod u+x ./clamav-daily/*.sh
$ sudo ./clamav-daily/clamav-rkhunter-scan.sh
```# Installation on CentOS/Rocky
```
$ sudo yum install epel-release
$ sudo yum install clamav clamav-update rkhunter mailx git
$ git clone https://github.com/lisenet/clamav-daily.git
$ chmod u+x ./clamav-daily/*.sh
$ sudo ./clamav-daily/clamav-rkhunter-scan.sh
```# Configuration
For systems that are up 24/7, you may want to put the script in the directory
/etc/cron.daily/
for daily execution.# Log Rotation
Log rotation is not handled by the script, however, you can use logrotate to achieve that if required.
Simply add your log rotation config to `/etc/logrotate.d/clamav-daily` and you should be good to go, e.g.:
```
/var/log/clamav/*.log {
daily
rotate 0
}
```When rotate count is set to 0, old versions are removed rather than rotated.