Skip to content

Instantly share code, notes, and snippets.

@handleman
Created April 22, 2020 12:04
Show Gist options
  • Save handleman/e70366004fb68fb10577034329dec745 to your computer and use it in GitHub Desktop.
Save handleman/e70366004fb68fb10577034329dec745 to your computer and use it in GitHub Desktop.
Config to run clamAv on macOs with automatic scan once a week. Full configuration for using clamAv antivirus on regular base with automatic scan once a week. It consist of the sh script which perform clamav signatures database update and scanner run, both with appropriate .plist xml files.
#!/usr/bin/env bash
freshclam && clamdscan -i --multiscan --move=/Users/handleman/quarantine ~
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.cisco.clamd</string>
<key>Program</key>
<string>/usr/local/sbin/clamd</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.cisco.clamdscan</string>
<key>Program</key>
<string>/Users/handleman/projects/scripts/avd.sh</string>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>1</integer>
<key>Minute</key>
<integer>0</integer>
<key>Weekday</key>
<integer>1</integer>
</dict>
</dict>
</plist>
@handleman
Copy link
Author

handleman commented Apr 22, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment