Squid Posted June 15, 2019 Share Posted June 15, 2019 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 Quote Link to comment
TQ Posted June 15, 2019 Share Posted June 15, 2019 To update what you want clamscan to scan, change the highlighted value in the Docker container ClamAV. Quote Link to comment
kizer Posted June 15, 2019 Share Posted June 15, 2019 @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. Quote Link to comment
TQ Posted June 15, 2019 Share Posted June 15, 2019 1 minute ago, kizer said: Also we might want to start posting the good stuff on the Support thread so it doesn’t get lost. Agreed: In Lounge until it gets moved. Quote Link to comment
wgstarks Posted June 15, 2019 Share Posted June 15, 2019 (edited) moved to new thread Edited June 15, 2019 by wgstarks Quote Link to comment
kizer Posted June 15, 2019 Share Posted June 15, 2019 3 minutes ago, TQ said: Agreed: In Lounge until it gets moved. I just Moved it to Docker Section. Quote Link to comment
Squid Posted June 17, 2019 Share Posted June 17, 2019 (edited) On 6/15/2019 at 1:24 PM, kizer said: I just Moved it to Docker Section. And surprisingly, you didn't delete it in the process 😜 Edited June 17, 2019 by Squid Quote Link to comment
kizer Posted June 17, 2019 Share Posted June 17, 2019 3 hours ago, Squid said: And surprisingly, you didn't delete it in the process 😜 Lol... I'm guessing I'm never going live that one down. Quote Link to comment
1812 Posted June 17, 2019 Share Posted June 17, 2019 trying this out, thanks for making it! Quote Link to comment
TQ Posted September 29, 2019 Share Posted September 29, 2019 trying this out, thanks for making it!Absolutely!Let’s keep our arrays virus free!Sent from a small phone with phat phingers Quote Link to comment
Recommended Posts
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.