Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 1.3 KB

File metadata and controls

53 lines (40 loc) · 1.3 KB

Clamav on Upsun

Here is a demonstration of how to use the ClamAV (antivirus) service.

Requirement

To function properly, ClamAV requires a minimum of 1.5 GB of memory.
You can define the list of virus databases to fetch in the etc/freshclam.conf file.

Usages

You have two protection solutions:

  • One-time scan: Allows you to trigger a scan either on a one-time or recurring basis (CRON).
    In this case, ClamAV is not continuously running as a daemon.
  • Service scan: Allows you to trigger a resource scan on demand through an external trigger (calling a TCP endpoint).
    In this case, ClamAV runs continuously as a daemon.

One-time scan

You can use :

./scripts/clam_update-db.sh   # Use to update virus database.
./scripts/clam_scan.sh        # Scan folder and move into quarantine.

for CRON usage :

application:
  mon-app:
  ...
    crons:
      update-db:
        spec: '0 0 * * *'
        commands:
          start: ./scripts/clam_update-db.sh
          stop: pkill freshclam

      scan-files:
        spec: 'H * * * *'
        commands:
          start: ./scripts/clam_scan.sh
          stop: pkill clamscan

Services

You can use :

./scripts/clam_update-db.sh   # Use to update virus database.
./scripts/clam_scan-clt.sh    # Scan folder and move into quarantine.