Giter Site home page Giter Site logo

clamav-cron's Introduction

This a modified version of the clamav-cron script by Stefano Stagnaro currently hosted on GoogleCode.
I'm including the vanilla 0.6 from GCode for the purposes of reference, and if anyone wants it.

http://code.google.com/p/clamav-cron/


I've also included my slightly remixed version "clamav-cron-est-0.7"

My version only emails on error, or virus detection rather than on every run.
It also rearranges the email, so the scan summary is at the top of the email, rather than the bottom.

My intention it to Pythonize the whole thing and do the output-mashing in memory, then send an email without relying on the *NIX mail command. 

P.S. Usage text is shamelessly stolen from Stefano's project page, as it still applies.

-----
USAGE
-----

Summary:
This is a simple Bash script for those who want to schedule the following tasks via cron:

update the ClamAV virus database (freshclam);
perform personal system scan (clamscan);
send a brief report via e-mail;
without any knowledge about ClamAV configuration files (such as clamd.conf or freshclam.conf) and without running the ClamAV daemon. You just have to configure the e-mail address(es) that will receive the report.

Dependencies:

To succesfilly run clamav-cron the following dependencies needs to be satisfied:

the ClamAV engine (look at ClamAV download center);
a mail server like Sendmail;

How to use:

1. Download clamav-cron somewhere like /usr/local/bin/ and give it execute permission:
      wget http://clamav-cron.googlecode.com/files/clamav-cron-0.6 -O /usr/local/bin/clamav-cron
      chmod 755 /usr/local/bin/clamav-cron

Simply open the clamav-cron script with your editor and edit the "User configuration" section following the instructions;
schedule the clamav-cron script via Cron in the preferred way. For example, you can install the clamav-cron in the crontab typing crontab -e from the user shell and entering a line like this:

45 23 * * 6 /usr/local/bin/clamav-cron /home

Cron will run clamav-cron every Saturday at 23:45 (11:45 pm) to recursevly scan the whole /home tree. At the end of task it will send a notification e-mail to the users specified at point 2. For more crontab option type man 5 crontab.


clamav-cron's People

Contributors

estuans avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.