Last active
October 29, 2020 14:00
-
-
Save maatthc/a5b76614438077a2550d416282a6ccbe to your computer and use it in GitHub Desktop.
This script runs upon login: Big IP Edge Client on Mac requires only part of McAfee to be running and jamfAgent
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
<!-- On line 16, replace 'MY_USERNAME' by your own username --> | |
<!-- Save as ~/Library/LaunchAgents/br.com.maat.vpn.plist --> | |
<!-- After creating both files, test it running: --> | |
<!-- $ launchctl load ~/Library/LaunchAgents/br.com.maat.vpn.plist --> | |
<!-- $ launchctl start br.com.maat.vpn --> | |
<!-- Check for error using: tail -f /var/log/system.log --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>br.com.maat.vpn</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/Users/MY_USERNAME/prepareVpn.sh</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
</dict> | |
</plist> |
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
# Save as ~/prepareVpn.sh and : chmod +x ~/prepareVpn.sh | |
# Stop McAfee - for performance | |
sudo /usr/local/McAfee/AntiMalware/VSControl stopoas | |
sudo launchctl unload /Library/LaunchDaemons/com.mcafee.agent.macmn.plist | |
sudo launchctl unload /Library/LaunchDaemons/com.mcafee.agent.ma.plist | |
sudo /Library/McAfee/agent/bin/masvc stop | |
sudo /usr/local/McAfee/WebProtection/bin/WPControl stop | |
sudo ps auxww | grep -i 'VShieldScanner\|VShieldScanManager\|masvc\|McAfee' | grep -v grep | awk '{ print $2 }' | sudo xargs kill -9 | |
kextstat | grep -i mcafee | awk '{ print $6 }' | sudo xargs -n1 -I{} kextunload -verbose 2 -bundle-id '{}' | |
# Start JamAgent | |
/usr/local/jamf/bin/jamfAgent | |
date > /tmp/prepareVpn.sh.output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment