-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathremove_sophos.sh
More file actions
executable file
·34 lines (28 loc) · 1.04 KB
/
remove_sophos.sh
File metadata and controls
executable file
·34 lines (28 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# ---------------------------------------------------------------------+
# This script will remove Sophos using the included removal package. |
# It can be used as a preinstall script or in Casper if the priority |
# is set to "Before." |
# |
# Created by James Barclay (james@everythingisgray.com) on 2013-08-01 |
# ---------------------------------------------------------------------+
exec 2>&1
sophos_dir="/Library/Sophos Anti-Virus"
remove_sophos_av="Remove Sophos Anti-Virus.pkg"
if [ $EUID -ne "0" ]; then
echo "This script must run as root. Exiting now."
exit 1
fi
if [ -d "$sophos_dir" ]; then
if [ -d "$sophos_dir/$remove_sophos_av" ]; then
cd "$sophos_dir"
/usr/sbin/installer -pkg "$remove_sophos_av" -target /
else
echo "$remove_sophos_av does not exist. Exiting now."
exit 1
fi
else
echo "$sophos_dir does not exist. Exiting now."
exit 1
fi
exit 0