-
Notifications
You must be signed in to change notification settings - Fork 2
/
PrinterManagementStandardUsers.pkginfo
87 lines (81 loc) · 2.55 KB
/
PrinterManagementStandardUsers.pkginfo
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>_metadata</key>
<dict>
<key>created_by</key>
<string>kevinmcox</string>
<key>creation_date</key>
<date>2021-08-17T12:44:44Z</date>
<key>munki_version</key>
<string>5.5.0.4360</string>
<key>os_version</key>
<string>11.5.2</string>
</dict>
<key>autoremove</key>
<false/>
<key>catalogs</key>
<array>
<string>testing</string>
<string>beta</string>
<string>live</string>
</array>
<key>category</key>
<string>NoPkg</string>
<key>description</key>
<string>Gives Standard (non-Admin) users the ability to manage Printers and Scanners in System Preferences.</string>
<key>developer</key>
<string>Kevin M. Cox</string>
<key>display_name</key>
<string>Printer Management by Standard Users</string>
<key>icon_name</key>
<string>Printer Pref Pane.png</string>
<key>installcheck_script</key>
<string>#!/bin/sh
# Check to see whether the staff group has been added to _lpadmin
installed=$(/usr/sbin/dseditgroup -o read -n /Local/Default _lpadmin | /usr/bin/grep ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000014)
# See if the check is empty
if [ -z "$installed" ]; then
/bin/echo "Standard users cannot manage printers, need to install."
exit 0
else
/bin/echo "Standard users can manage printers, no action needed."
exit 1
fi</string>
<key>installer_type</key>
<string>nopkg</string>
<key>minimum_os_version</key>
<string>10.12.0</string>
<key>name</key>
<string>PrinterManagementStandardUsers</string>
<key>postinstall_script</key>
<string>#!/bin/sh
/usr/sbin/dseditgroup -o edit -n /Local/Default -a staff -t group _lpadmin</string>
<key>unattended_install</key>
<true/>
<key>unattended_uninstall</key>
<true/>
<key>uninstall_method</key>
<string>uninstall_script</string>
<key>uninstall_script</key>
<string>#!/bin/sh
/usr/sbin/dseditgroup -o edit -n /Local/Default -d staff -t group _lpadmin</string>
<key>uninstallable</key>
<true/>
<key>uninstallcheck_script</key>
<string>#!/bin/sh
# Check to see whether the staff group has been added to _lpadmin
installed=$(/usr/sbin/dseditgroup -o read -n /Local/Default _lpadmin | /usr/bin/grep ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000014)
# See if the check is empty
if [ -z "$installed" ]; then
/bin/echo "Standard users cannot manage printers, no action needed."
exit 1
else
/bin/echo "Standard users can manage printers, need to uninstall."
exit 0
fi</string>
<key>version</key>
<string>1.0</string>
</dict>
</plist>