-
Notifications
You must be signed in to change notification settings - Fork 0
/
remove-1password.sh
45 lines (40 loc) · 1.38 KB
/
remove-1password.sh
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
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
#####################################################################################################
#
# ABOUT THIS PROGRAM
#
# NAME
# 1Password 7.sh -- Removes 1Password 7
#
# SYNOPSIS
# sudo 1Password 7 Remover.sh
#
####################################################################################################
#
# HISTORY
#
# Version: 1.0
#
# - Martyn Watts, 13.08.2021 Initial Build
# - Michael Tanner, 29.09.2021 Modified Build
#
####################################################################################################
# Script to remove 1Password 7.
appName='1Password 7'
logfile="/Library/Logs/1PasswordRemoverScript.log"
deplog="/var/tmp/depnotify.log"
echo "Status: Installing ${appName}" >> ${deplog}
# Check to see if the App is installed.
if [[ -e "/Applications/${appName}.app" ]]; then
/bin/echo "`date`: Uninstalling 1Password Manager" >> ${logfile}
/bin/echo "`date`: Uninstalling 1Password Manager"
killall 1Password\ 7
CurrentUser=$(/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }')
rm -rf /Applications/1Password\ 7.app
else
/bin/echo "`date`: 1Password not installed - Skipping" >> ${logfile}
/bin/echo "`date`: 1Password not installed - Skipping"
fi
#jamf policy -id 036 >> ${logfile} - Reinstall using Install 1Password Policy
/bin/echo "--" >> ${logfile}
/bin/echo "Command: DeterminateManualStep: 1" >> ${deplog}