Last active
December 17, 2015 08:49
-
-
Save RobFreiburger/5582643 to your computer and use it in GitHub Desktop.
Example install script for McAfee VirusScan for Mac. Assumes used with JAMF Software Casper Suite. Tested on 10.6 Snow Leopard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# mcafeeInstall.sh | |
# Created by Rob Freiburger on 5/19/11 | |
### GET VARS | |
tmpfolder=/tmp/mcafeeInstall$(/usr/bin/date '+%Y%m%d%H%M%S') | |
/usr/bin/mkdir $tmpfolder | |
username=$SUDO_USER | |
if [ -z $username ]; then | |
username=$(/usr/bin/users) | |
if [ -z $username ]; then | |
echo "Unable to determine username!" | |
exit 1 | |
fi | |
fi | |
### DOWNLOAD AND UNZIP PLISTBUDDY | |
/usr/bin/curl -s http://example.com/CasperShare/Download/Resources/PlistBuddy.zip -o $tmpfolder/PlistBuddy.zip | |
/usr/bin/unzip -oq $tmpfolder/PlistBuddy.zip -d $tmpfolder/ | |
### DOWNLOAD & UNZIP MCAFEE INSTALLERS | |
/usr/bin/curl -s http://example.com/CasperShare/Download/Resources/mcafee.zip -o $tmpfolder/mcafee.zip | |
/usr/bin/unzip -oq $tmpfolder/mcafee.zip -d $tmpfolder/ | |
### RUN MCAFEE BASE INSTALL | |
/usr/sbin/installer -allow -pkg $tmpfolder/MSMBaseInstall.mpkg -target / | |
### MODIFY CONFIGURATION FILES | |
# Manual restart needed for changes to take effect | |
# Next step will restart VirusScan | |
# Exclude Parallels Virtual Machines | |
$tmpfolder/PlistBuddy -c "Add :OAS_Exclusion_List string /Users/$username/Documents/Parallels" /Library/Preferences/com.mcafee.ssm.antimalware.plist | |
$tmpfolder/PlistBuddy -c "Add :ODS_Exclusion_List string /Users/$username/Documents/Parallels" /Library/Preferences/com.mcafee.ssm.antimalware.plist | |
# Add internal virus definition FTP site. | |
# Easiest way is to replace SiteList.xml | |
/usr/bin/cp -f $tmpfolder/SiteList.xml /Library/McAfee/cma/scratch/etc/SiteList.xml | |
### RUN MCAFEE PATCH INSTALLERS | |
/usr/sbin/installer -allow -pkg $tmpfolder/MSMPatch1.mpkg -target / | |
/usr/sbin/installer -allow -pkg $tmpfolder/MSMFileVaultHF.mpkg -target / | |
/usr/sbin/installer -allow -pkg $tmpfolder/MSM64bitHF.mpkg -target / | |
### CLEANUP | |
/usr/bin/rm -R $tmpfolder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment