Created
December 16, 2015 23:59
-
-
Save krispayne/a4af5f4bb33a88eacf76 to your computer and use it in GitHub Desktop.
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 | |
# Determines who is logged in and then kills SEP and relaunches sans reboot. | |
# Get logged in user from /dev/console | |
loggedInUser=`ls -l /dev/console | awk '{ print $3 }'` | |
if [ "$loggedInUser" != "admin" ] | |
then | |
launchctl unload /Library/LaunchDaemons/com.symantec.Sched501-1.plist | |
launchctl unload /Library/LaunchDaemons/com.symantec.avscandaemon.plist | |
launchctl unload /Library/LaunchDaemons/com.symantec.diskMountNotify.plist | |
launchctl unload /Library/LaunchDaemons/com.symantec.navapd.plist | |
launchctl unload /Library/LaunchDaemons/com.symantec.navapdaemonsl.plist | |
launchctl unload /Library/LaunchDaemons/com.symantec.sharedsettings.plist | |
launchctl unload /Library/LaunchDaemons/com.symantec.symSchedDaemon.plist | |
launchctl unload /Library/LaunchDaemons/com.symantec.symdaemon.plist | |
launchctl unload /Library/LaunchAgents/com.symantec.uiagent.application.plist | |
killall NortonAutoProtect | |
killall SymQuickMenu | |
killall SymSecondaryLaunch | |
ps ax | grep -w 'SymDaemon\|SymSharedSettingsd\|SymUIAgent' | awk '{print $1}' | xargs kill | |
cd / | |
su $loggedInUser -c "/Library/Application\ Support/Symantec/SymQuickMenu/SymQuickMenu.app/Contents/MacOS/SymQuickMenu &" | |
su $loggedInUser -c "/Library/Application\ Support/Norton\ Solutions\ Support/Scheduler/SymSecondaryLaunch.app/Contents/MacOS/SymSecondaryLaunch &" | |
else | |
echo "admin is logged in" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment