Upgrade OS X Server's ClamAV
02/05/2015, 12:43 - Apple
Reference to Updating ClamAv on OS X Server >= 10.5.6

Here is my script to auto build
clamav_renew.sh

#!/bin/bash
#
VERSION=0.98.6
if [ -e clamav-${VERSION}.tar.gz ]; then
rm -fr clamav-${VERSION}.tar.gz
fi
#
if [ -d clamav-${VERSION} ]; then
rm -fr clamav-${VERSION}
fi
#
wget http://sourceforge.net/projects/clamav/files/clamav/${VERSION}/clamav-${VERSION}.tar.gz
#
tar -zxvf clamav-${VERSION}.tar.gz
#
cd clamav-${VERSION}
#
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/private/etc \
--enable-bigstack --enable-static \
--with-user=_clamav --with-group=_clamav \
--with-dbdir=/var/clamav --datadir=/var/clamav
#
make
#
make check
#
SELECT=""
IFS=''
#
echo "Press Y to install ClamAV, version " ${VERSION}
read -s -n 1 SELECT
#
if [[ "$SELECT" =~ [yY] ]]; then
make install
#
echo "Reload clamav"
if [ -e clamav_reload.sh ]; then
./clamav_reload.sh
fi
#
fi
#


clamav_reload.sh

#!/bin/bash
#
# refresh database
sudo /bin/launchctl unload -w /System/Library/LaunchDaemons/org.clamav.freshclam.plist
sudo /bin/launchctl load -w /System/Library/LaunchDaemons/org.clamav.freshclam.plist
# restart clamd
sudo /bin/launchctl unload -w /System/Library/LaunchDaemons/org.clamav.clamd.plist
sudo /bin/launchctl load -w /System/Library/LaunchDaemons/org.clamav.clamd.plist
#a reload amavisd
sudo /bin/launchctl unload /System/Library/LaunchDaemons/org.amavis.amavisd.plist
sudo /bin/launchctl load /System/Library/LaunchDaemons/org.amavis.amavisd.plist
#


回應

發表回應

填寫下面來發表回應。









插入項目:


遊覽已上傳的圖片








回應需經過管理人員認可後才會出現在網頁上.