-
Notifications
You must be signed in to change notification settings - Fork 16
ClamAV
Matt Simerson edited this page May 20, 2023
·
6 revisions
. mail-toaster.sh && provision clamav
Install the ClamAV Fangfrisch sigs if CLAMAV_FANGFRISCH is != 0.
Install the ClamAV unofficial sigs if CLAMAV_UNOFFICIAL is != 0.
jailmanage clamav
export CLAMAV_UV=4.8
pkg install -y gnupg1 rsync bind-tools
fetch https://github.com/extremeshok/clamav-unofficial-sigs/archive/$CLAMAV_UV.tar.gz
tar -xzf $CLAMAV_UV.tar.gz
cd clamav-unofficial-sigs-$CLAMAV_UV
sed -i .bak -e 's/\/var\/lib/\/var\/db/' clamav-unofficial-sigs.conf
sed -i .bak -e 's/^clam_user="clam"/clam_user="clamav"/' clamav-unofficial-sigs.conf
sed -i .bak -e 's/^clam_group="clam"/clam_group="clamav"/' clamav-unofficial-sigs.conf
sed -i .bak -e 's/^#!\/bin\/bash/#!\/usr\/local\/bin\/bash/' clamav-unofficial-sigs.sh
chmod 755 clamav-unofficial-sigs.sh
cp clamav-unofficial-sigs.sh /usr/local/bin
cp clamav-unofficial-sigs.conf /usr/local/etc/
cp clamav-unofficial-sigs.8 /usr/local/man/man8
mkdir -p /var/log/clamav-unofficial-sigs
mkdir -p /usr/local/etc/periodic/daily
tee <<EOSIG > /usr/local/etc/periodic/daily/clamav-unofficial-sigs
#!/bin/sh
/usr/local/bin/clamav-unofficial-sigs.sh -c /usr/local/etc/clamav-unofficial-sigs.conf
EOSIG
chmod 755 /usr/local/etc/periodic/daily/clamav-unofficial-sigs
mkdir -p /usr/local/etc/newsyslog.conf.d
echo '/var/log/clamav-unofficial-sigs.log root:wheel 640 3 1000 * J' > /usr/local/etc/newsyslog.conf.d/clamav-unofficial-sigs
/usr/local/etc/periodic/daily/clamav-unofficial-sigs
Edit the config file and enter your credentials.
vim clamav-unofficial-sigs.conf