https://github.com/upsun/demo-clamav
https://github.com/upsun/demo-clamav
activation nix upsun-example
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/upsun/demo-clamav
- Owner: upsun
- Created: 2025-02-06T17:17:59.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-25T14:04:28.000Z (about 1 year ago)
- Last Synced: 2025-06-17T01:40:49.266Z (12 months ago)
- Topics: activation, nix, upsun-example
- Language: Shell
- Homepage:
- Size: 50.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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.
```