This commit is contained in:
Brian Zalewski 2024-01-03 23:24:25 +00:00
parent 66c8f52e4d
commit 70993cb856
4 changed files with 77 additions and 14 deletions

View file

@ -0,0 +1,30 @@
{{- if eq .host.distro.family "darwin" -}}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>clamav.clamdscan</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/clamdscan</string>
<string>/</string>
</array>
<key>StartCalendarInterval</key>
<array>
<dict>
<key>Hour</key>
<integer>22</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
</array>
<key>UserName</key>
<string>root</string>
<key>StandardErrorPath</key>
<string>/var/log/clamav/clamdscan.error.log</string>
<key>StandardOutPath</key>
<string>/var/log/clamav/clamdscan.output.log</string>
</dict>
</plist>
{{- end -}}

View file

@ -115,7 +115,7 @@ DatabaseMirror database.clamav.net
# Number of database checks per day. # Number of database checks per day.
# Default: 12 (every two hours) # Default: 12 (every two hours)
#Checks 24 Checks 1
# Proxy settings # Proxy settings
# The HTTPProxyServer may be prefixed with [scheme]:// to specify which kind # The HTTPProxyServer may be prefixed with [scheme]:// to specify which kind

View file

@ -0,0 +1,30 @@
{{- if eq .host.distro.family "darwin" -}}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>clamav.freshclam</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/freshclam</string>
<string>-v</string>
</array>
<key>StartCalendarInterval</key>
<array>
<dict>
<key>Hour</key>
<integer>21</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
</array>
<key>UserName</key>
<string>{{ $.chezmoi.username }}</string>
<key>StandardErrorPath</key>
<string>/var/log/clamav/freshclam.error.log</string>
<key>StandardOutPath</key>
<string>/var/log/clamav/freshclam.output.log</string>
</dict>
</plist>
{{- end -}}

View file

@ -725,16 +725,6 @@ softwarePackages:
_home: https://github.com/quark-engine/quark-engine _home: https://github.com/quark-engine/quark-engine
_name: Quark-Engine _name: Quark-Engine
pipx: quark-engine pipx: quark-engine
antivirus:
_bin: null
_desc: >-
[Clam AntiVirus](https://www.clamav.net/) is a free software, cross-platform and open-source antivirus software toolkit able to detect many types of malicious software, including viruses. One of its main uses is on mail servers as a server-side email virus scanner. [rkhunter](http://rkhunter.sourceforge.net/) is a Unix-based tool that scans for rootkits, backdoors, and possible local exploits. It does this by comparing SHA-1 hashes of important files with known good ones in online databases. [Malwarebytes](https://www.malwarebytes.com/) is an anti-malware software for Microsoft Windows, macOS, Chrome OS, Android, and iOS that finds and removes malware. Made by Malwarebytes Corporation, it was first released in January 2006.
_docs: https://docs.clamav.net/
_github: https://github.com/Cisco-Talos/clamav
_home: >-
https://www.clamav.net/ https://www.malwarebytes.com/
_name: AntiVirus
ansible: professormanhattan.antivirus
swiftformat: swiftformat:
_bin: swiftformat _bin: swiftformat
_github: https://github.com/nicklockwood/SwiftFormat _github: https://github.com/nicklockwood/SwiftFormat
@ -2338,7 +2328,8 @@ softwarePackages:
_name: ClamAV _name: ClamAV
_post: | _post: |
#!/usr/bin/env bash #!/usr/bin/env bash
# Add freshclam.conf
### Add freshclam.conf
if [ -f "$HOME/.local/etc/clamav/freshclam.conf" ]; then if [ -f "$HOME/.local/etc/clamav/freshclam.conf" ]; then
sudo mkdir -p /usr/local/etc/clamav sudo mkdir -p /usr/local/etc/clamav
sudo cp -f "$HOME/.local/etc/clamav/freshclam.conf" /usr/local/etc/clamav/freshclam.conf sudo cp -f "$HOME/.local/etc/clamav/freshclam.conf" /usr/local/etc/clamav/freshclam.conf
@ -2346,7 +2337,8 @@ softwarePackages:
ln -s /usr/local/etc/clamav/freshclam.conf "${HOMEBREW_PREFIX:-/opt/homebrew}/etc/clamav/freshclam.conf" ln -s /usr/local/etc/clamav/freshclam.conf "${HOMEBREW_PREFIX:-/opt/homebrew}/etc/clamav/freshclam.conf"
fi fi
fi fi
# Add clamd.conf
### Add clamd.conf
if [ -f "$HOME/.local/etc/clamav/clamd.conf" ]; then if [ -f "$HOME/.local/etc/clamav/clamd.conf" ]; then
sudo mkdir -p /usr/local/etc/clamav sudo mkdir -p /usr/local/etc/clamav
sudo cp -f "$HOME/.local/etc/clamav/clamd.conf" /usr/local/etc/clamav/clamd.conf sudo cp -f "$HOME/.local/etc/clamav/clamd.conf" /usr/local/etc/clamav/clamd.conf
@ -2354,8 +2346,19 @@ softwarePackages:
ln -s /usr/local/etc/clamav/clamd.conf "${HOMEBREW_PREFIX:-/opt/homebrew}/etc/clamav/clamd.conf" ln -s /usr/local/etc/clamav/clamd.conf "${HOMEBREW_PREFIX:-/opt/homebrew}/etc/clamav/clamd.conf"
fi fi
fi fi
# Update database
### Update database
freshclam freshclam
### Setting up launchd services on macOS
if [ -d /Applications ] && [ -d /System ]; then
sudo mkdir -p /var/log/clamav
sudo chown $USER /var/log/clamav
sudo cp -f "$HOME/.local/etc/clamav/clamdscan.plist.tmpl" /Library/LaunchDaemons/clamdscan.plist
sudo cp -f "$HOME/.local/etc/clamav/freshclam.plist.tmpl" /Library/LaunchDaemons/freshclam.plist
sudo launchctl load -w /Library/LaunchDaemons/clamdscan.plist
sudo launchctl load -w /Library/LaunchDaemons/freshclam.plist
fi
_service:apt: clamav-freshclam _service:apt: clamav-freshclam
_service:dnf: clamd-freshclam _service:dnf: clamd-freshclam
_service:pacman: clamav-freshclam _service:pacman: clamav-freshclam