feat: support update ClamAV databases (#747)
This commit is contained in:
@@ -65,6 +65,7 @@ pub enum Step {
|
||||
Chezmoi,
|
||||
Chocolatey,
|
||||
Choosenim,
|
||||
ClamAvDb,
|
||||
Composer,
|
||||
Conda,
|
||||
ConfigUpdate,
|
||||
|
||||
@@ -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", || {
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user