-
-
Save tapickell/5143ced8566516fc084aa8d67e50b6ef to your computer and use it in GitHub Desktop.
Mcafee Endpoint Killer
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/bash | |
# relaunch with sudo if we aren't root | |
if [[ $EUID -ne 0 ]]; then | |
echo "$0: relaunching as sudo $0 $1 $USER" | |
sudo "$0" $1 $USER | |
exit $? | |
fi | |
real_user=$USER | |
if [ -n "$2" ]; then | |
real_user=$2 | |
fi | |
stop() { | |
echo $0: unloading Symantec Endpoint Protection daemon | |
#launchctl unload /Library/LaunchDaemons/com.symantec.symdaemon.plist | |
launchctl unload /Library/LaunchDaemons/com.mcafee.agent.ma.plist | |
launchctl unload /Library/LaunchDaemons/com.mcafee.agent.macmn.plist | |
launchctl unload /Library/LaunchDaemons/com.mcafee.agent.macompat.plist | |
echo $0: unloading Symantec Endpoint Protection shared settings daemon | |
#launchctl unload /Library/LaunchDaemons/com.symantec.sharedsettings.plist | |
launchctl unload /Library/LaunchDaemons/com.mcafee.ssm.Eupdate.plist | |
launchctl unload /Library/LaunchDaemons/com.mcafee.ssm.ScanFactory.plist | |
launchctl unload /Library/LaunchDaemons/com.mcafee.ssm.ScanManager.plist | |
launchctl unload /Library/LaunchDaemons/com.mcafee.virusscan.fmpd.plist | |
echo $0: closing Symantec Endpoint Protection UI widget as $real_user | |
#sudo -u $real_user launchctl unload /Library/LaunchAgents/com.symantec.uiagent.application.plist | |
sudo -u $real_user launchctl unload /Library/LaunchAgents/com.mcafee.menulet.plist | |
sudo -u $real_user launchctl unload /Library/LaunchAgents/com.mcafee.reporter.plist | |
} | |
start() { | |
echo $0: loading Symantec Endpoint Protection daemon | |
launchctl load /Library/LaunchDaemons/com.symantec.symdaemon.plist | |
echo $0: loading Symantec Endpoint Protection shared settings daemon | |
launchctl load /Library/LaunchDaemons/com.symantec.sharedsettings.plist | |
echo $0: launching Symantec Endpoint Protection UI widget as $real_user | |
sudo -u $real_user launchctl load /Library/LaunchAgents/com.symantec.uiagent.application.plist | |
} | |
case "$1" in | |
start) | |
start | |
;; | |
stop) | |
stop | |
;; | |
*) | |
echo "Usage: $0 [start|stop]" | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment