diff --git a/src/config.rs b/src/config.rs index f1db5210..d02038d9 100644 --- a/src/config.rs +++ b/src/config.rs @@ -65,6 +65,7 @@ pub enum Step { Chezmoi, Chocolatey, Choosenim, + ClamAvDb, Composer, Conda, ConfigUpdate, diff --git a/src/main.rs b/src/main.rs index d1694501..cd3eaa00 100644 --- a/src/main.rs +++ b/src/main.rs @@ -405,6 +405,7 @@ fn run() -> Result<()> { runner.execute(Step::Bob, "Bob", || generic::run_bob(&ctx))?; runner.execute(Step::Certbot, "Certbot", || generic::run_certbot(&ctx))?; runner.execute(Step::GitRepos, "Git Repositories", || git::run_git_pull(&ctx))?; + runner.execute(Step::ClamAvDb, "ClamAV Databases", || generic::run_freshclam(&ctx))?; if should_run_powershell { runner.execute(Step::Powershell, "Powershell Modules Update", || { diff --git a/src/steps/generic.rs b/src/steps/generic.rs index f07638e2..dc5775b4 100644 --- a/src/steps/generic.rs +++ b/src/steps/generic.rs @@ -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() +}