/go/clamav manages the open-source ClamAV antivirus engine on a GoAdmio server and uses it to scan hosted sites. It does one of two things, depending on whether you pass an argument: Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Install ClamAV, or update its signatures if already installed
/go/clamav
# Scan one domain
/go/clamav example.com
# Scan every account
/go/clamav all
[!WARNING]
Scans run with--remove. Infected files are deleted immediately, with no quarantine and no confirmation. Make sure you have a recentbackuporsnapshotbefore scanning.
Arguments
| Argument | Required | Default | Notes |
|---|---|---|---|
<domain> |
No | — | The account’s domain. /home/<domain> must exist. |
all |
No | — | Reserved word. Scans every account under /home. |
There are no -- options. Giving any argument switches the command into scan mode, so installing and updating happen only when you run it with no argument.
The domain is passed to the scanner as typed. It is not lowercased, normalized, or checked against the Site table, so use the exact folder name from /home.
Examples
# First run on a new server: installs ClamAV
/go/clamav
# Refresh virus signatures before a scan
/go/clamav
/go/clamav all
# Scan and clean a single account
/go/clamav example.com
# Review what has been run recently
tail -n 20 /var/log/go/clamav.log
# Update signatures daily at 03:00, then scan all accounts at 03:30
0 3 * * * /go/clamav
30 3 * * * /go/clamav all
Output
The command prints plain text, not JSON.
| Situation | What you see |
|---|---|
| Install | Installing ClamAV antivirus..., followed by the package manager output. |
| Update | Updating ClamAV antivirus..., followed by freshclam output (none on RHEL-family systems, which run it quietly). |
| Scan one domain | Scanning <domain>..., then the list of infected files and a scan summary. |
| Scan all domains | Scanning All Domains..., then the list of infected files and a scan summary. |
| Unsupported operating system | Unknown operating system. Nothing is installed or scanned. |
| Domain folder not found | No output. Nothing is scanned. |
Every run is also logged with a timestamp, for example [Nov 20 09:15:02]# clamav example.com, to /var/log/go/clamav.log.
Scans use --infected, so only infected files are listed. Clean files are not printed. The summary at the end of a scan reports the number of files scanned, the number infected, and the data scanned.
See the full reference at /go/clamav and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
