feat: support update ClamAV databases (#747)

This commit is contained in:
SteveLauC
2024-03-19 14:10:47 +08:00
committed by GitHub
parent 351922c81f
commit d50360a69a
3 changed files with 11 additions and 0 deletions

View File

@@ -931,3 +931,12 @@ pub fn run_certbot(ctx: &ExecutionContext) -> Result<()> {
cmd.status_checked()
}
/// Run `$ freshclam` to update ClamAV signature database
///
/// doc: https://docs.clamav.net/manual/Usage/SignatureManagement.html#freshclam
pub fn run_freshclam(ctx: &ExecutionContext) -> Result<()> {
let freshclam = require("freshclam")?;
print_separator("Update ClamAV Database(FreshClam)");
ctx.run_type().execute(freshclam).status_checked()
}