ClamAV or other AV docker available?


shaunvis

Recommended Posts

To schedule scans,

 

Disable autostart on the app from the docker tab (otherwise it will do a scan everytime you start the server) - up to you.

 

Run this as a user script on a schedule which you choose.  Will send a start / stop notification with the # of infected files.  You'll have to look at the logs to determine which file(s) are infected

#!/usr/bin/php
<?
exec('/usr/local/emhttp/plugins/dynamix/scripts/notify -e "Antivirus Scan" -s "Antivirus Scan Started" -d "Antivirus Scan Started" -i "normal"');
exec('docker start ClamAV');
for ( ;; ) {
  $status = trim(exec("docker ps | grep ClamAV"));
  if ( ! $status ) break;
  sleep(600);
}
$infected = system("docker logs ClamAV | grep -i 'Infected'");
exec('/usr/local/emhttp/plugins/dynamix/scripts/notify -e "Antivirus Scan" -s "Antivirus Scan Finished" -d '.escapeshellarg($infected).' -i "normal"');
?>

 

script

Link to comment

@Squid

 

Can your script be modified to exclude or specify a Share? It went HayWire Scanning my TimeMachine Backup. 

 

Also we might want to start posting the good stuff on the Support thread so it doesn’t get lost. 

 

************** Note *****************

 

Saw your mention about Multiple Instances of Docker to Select which to Scan in the Support Thread. 

 

Thanks. 

Link to comment
  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.