#!/bin/bash # # $Id: Sophos.install,v 1.4 2002/01/11 15:19:43 jkf Exp $ # # Run this script to install Sophos in the right place, with the right # options for the MailScanner. # Run this script from inside the directory in which you have copied # and unpacked the Sophos distribution. # Tweaked for Solaris. SOPHOS=/usr/local/Sophos COMPD=linux.intel.libc6.tar.Z DISTRIB=linux.intel.libc6.tar mkdir -p ${SOPHOS} chown -R root ${SOPHOS} chmod -R go+rX ${SOPHOS} # Clear out any old libs from /usr/local/lib which is where # a default SAVI installation will have left them echo Clearing out old default Sophos installation libraries rm -f /usr/local/lib/libsavi.so* # Have we got to uncompress the distribution for them? if [ -f $COMPD ]; then echo Uncompressing Sophos distribution uncompress $COMPD fi # Have we got to unpack the distribution for them? if [ -f $DISTRIB ]; then # Is there an old unpacked distribution here too?? if [ -d sav-install ]; then echo Clearing out unpacked distribution rm -rf sav-install fi # Unpack the distribution echo Unpacking distribution tar xBf $DISTRIB fi # JKF 31/08/2001 Remove any existing vdl.dat files if [ -f ${SOPHOS}/lib/vdl.dat ]; then rm -f ${SOPHOS}/lib/vdl* fi if [ -f ${SOPHOS}/lib/vdln.dat ]; then rm -f ${SOPHOS}/lib/vdl* fi # Are we in the right directory, or one above it? if [ -d sav-install ]; then cd sav-install fi # Check we have found the install.sh script if [ \! -f install.sh ]; then echo Please cd into the directory containing the Sophos install.sh echo script and run this command again. exit 1 fi echo Installing Sophos for MailScanner ./install.sh -v -d ${SOPHOS} -s lib -ni echo echo Fetching latest IDE virus identities from www.sophos.com ${SOPHOS}/bin/autoupdate if [ -f ${SOPHOS}/bin/sophoswrapper ]; then chmod a=rx ${SOPHOS}/bin/sophoswrapper echo Done. else echo Something has gone wrong. There should be a copy of the echo script sophoswrapper in the directory echo ${SOPHOS}/bin. Please re-install the MailScanner or fetch echo another copy of sophoswrapper from the distribution web site. fi exit 0