Last active
February 21, 2017 00:53
-
-
Save ashleyblackmore/8bc945bba6f79cf591252fb5005fba99 to your computer and use it in GitHub Desktop.
Setting up ClamAV for macOS Sierra
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /usr/local/etc/clamav/clamd.conf | |
# n.b., mirrors not https at time of writing - regardless, setting this does not fail the update. | |
DatabaseMirror https://database.clamav.net | |
DatabaseDirectory /var/lib/clamav/ | |
OfficialDatabaseOnly yes | |
# /tmp is not the best place for this, but need to choose somewhere writeable by clamscan/clamd user | |
LogFile /tmp/clamd.log | |
LogFileMaxSize 20M | |
LogTime yes | |
ExtendedDetectionInfo yes | |
# again, /tmp is not the best place | |
LocalSocket /tmp/clamd.socket | |
LocalSocketMode 660 | |
FixStaleSocket yes | |
# in macOS prefs, set "Script Editor" notifications to 'alert' - will help force acknowledgement on signature match | |
osascript -e 'display notification "Lorem ipsum dolor sit amet" with title "Title"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 0 * * * freshclam -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install clamav | |
# set config as shown (or as needed) in rest of gist | |
sudo mkdir -pv /var/lib/clamav | |
sudo chown clamav:clamav /var/lib/clamav/ | |
sudo freshclam -v | |
# set up clamd if you want a daemon | |
clamscan --follow-file-symlinks=2 --follow-dir-symlinks=2 --bell -r -i / |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment