Created
June 14, 2016 20:17
-
-
Save opragel/8fafc5defbe6d4f5e4622fdb80fb0c39 to your computer and use it in GitHub Desktop.
remove_eset_nod32antivirus_osx.sh
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 | |
APP_PROCESS_NAMES=( "ESET NOD32 Antivirus" \ | |
"esets_ctl" \ | |
"esets_daemon" \ | |
"esets_kac" \ | |
"esets_mac" ) | |
DAEMON_PATHS=( "/Library/LaunchDaemons/com.eset.esets_daemon.plist") | |
REMOVE_PATHS=( "/Applications/ESET NOD32 Antivirus.app" \ | |
"/Library/LaunchDaemons/com.eset.esets_daemon.plist" \ | |
"/Library/Application Support/ESET/" ) | |
for daemonPath in "${DAEMON_PATHS[@]}" | |
do | |
if [ -e "$daemonPath" ]; then | |
launchctl unload "$daemonPath" | |
else | |
printf "Not found: %s\n" "$daemonPath" | |
fi | |
done | |
for appProcessName in "${APP_PROCESS_NAMES[@]}" | |
do | |
if pgrep "$appProcessName"; then | |
killall "$appProcessName" | |
fi | |
done | |
for removePath in "${REMOVE_PATHS[@]}" | |
do | |
if [ -e "$removePath" ]; then | |
printf "Deleting: %s\n" "$removePath" | |
rm -rf "$removePath" | |
else | |
printf "Not found: %s\n" "$removePath" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment