Created
March 4, 2020 14:59
-
-
Save patgmac/43354ee024af521c579d24a06876c9bc to your computer and use it in GitHub Desktop.
This file contains 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/bash | |
# McAfee Installer | |
# Author: Patrick Gallagher | |
# Created: 4/18/2012 | |
# Modified: 01/28/2019 | |
Version=10.5.7 | |
pkgName="McAfee-Threat-Prevention-for-Mac-10.5.7-ePO-client-package-RTW-112.pkg" | |
#hf="McAfee-Threat-Prevention-for-Mac-10.5.0-274-ePO-client-package-HF1244068.pkg" | |
# Setup logging | |
LogLoc=/Library/Logs/THD_McAfee_Install.log | |
if [ -e "${LogLoc}" ]; then | |
echo >> "${LogLoc}"; echo "<<< *** New Install Log for $(scutil --get HostName): $(date) *** >>>" >> "${LogLoc}"; echo >> "${LogLoc}" | |
else | |
echo "<<< *** New Install Log for $(scutil --get HostName): $(date) *** >>>" > "${LogLoc}"; echo >> "${LogLoc}" | |
fi | |
# Install McAfee Agent from the install.sh | |
echo "Installing the McAfee agent..." | |
echo >> "${LogLoc}" | |
echo "*** Log for McAfee agent install: $(date) ***" >> "${LogLoc}" | |
sh install.sh -i >> "${LogLoc}" 2>&1 | |
sleep 5 | |
#Install $pkgName | |
echo "Installing ${pkgName}..." | |
echo >> "${LogLoc}"; echo "*** Log for McAfee Endpoint Security for Mac Install: $(date) ***" >> "${LogLoc}" | |
installer -pkg "${pkgName}" -target / >>"${LogLoc}" 2>&1 | |
#echo "Installing ${hf}..." | |
#echo >> "${LogLoc}"; echo "*** Log for McAfee Endpoint Security for Mac Install: $(date) ***" >> "${LogLoc}" | |
#installer -pkg "${hf}" -target / >>"${LogLoc}" 2>&1 | |
# Verify McAfee app installed | |
if [[ ! -e "/Applications/McAfee Endpoint Security for Mac.app" ]]; then | |
echo "ERROR: McAfee not properly installed" >> "${LogLoc}" | |
echo "ERROR: McAfee not properly installed" | |
exit 1 | |
fi | |
# Force check-in with ePO | |
/Library/McAfee/cma/bin/cmdagent -p | |
sleep 3 | |
/Library/McAfee/cma/bin/cmdagent -c | |
sleep 5 | |
/Library/McAfee/cma/bin/cmdagent -e | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment