-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Delayed Policy Trigger Remove.bash
57 lines (40 loc) · 1.51 KB
/
Delayed Policy Trigger Remove.bash
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
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
####################################################################################################
#
# ABOUT
#
# Remove a LaunchDaemon
#
####################################################################################################
#
# HISTORY
#
# Version 1.0, 24-Aug-2015, Dan K. Snelson
# Original version
# Inspired by Kyle Brockman (brockma9)
# https://jamfnation.jamfsoftware.com/discussion.html?id=6990
# Version 1.1, 02-Nov-2017, Dan K. Snelson
# Updated log writing
# Version 1.1.1, 17-Aug-2019, Dan K. Snelson
# Updates for macOS Catalina
#
####################################################################################################
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Variables
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
plistDomain="com.company" # Hard-coded domain name (i.e., "com.company")
plistLabel="${4}" # Unique label for this plist (i.e., "presentationMode2")
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Program
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
echo "Remove ${plistDomain}.${plistLabel}"
# Remove launchd plist
echo "• Remove ${plistDomain}.${plistLabel} ..."
/bin/launchctl remove ${plistDomain}.${plistLabel}
# Send result back to the Jamf Pro server
echo "Removed ${plistDomain}.${plistLabel}"
exit 0