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
#

發表回應 發表回應 ( 920預覽 )   |  [ 0 引用 ]   |  permalink   |   ( 3.1 / 160 )


<前一頁 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 下一頁> 最後>>