-
Notifications
You must be signed in to change notification settings - Fork 0
/
monitoringclient-install.plist
68 lines (65 loc) · 1.95 KB
/
monitoringclient-install.plist
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
<?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>autoremove</key>
<false/>
<key>catalogs</key>
<array>
<string>testing</string>
<string>production</string>
</array>
<key>description</key>
<string>Installs the Monitoring Client that informs us of impending failures and the health of your Mac.</string>
<key>display_name</key>
<string>Monitoring Client</string>
<key>minimum_os_version</key>
<string>10.11.0</string>
<key>installer_type</key>
<string>nopkg</string>
<key>name</key>
<string>MonitoringClient</string>
<key>postinstall_script</key>
<string><![CDATA[#!/bin/bash
GROUP_NAME="ENTER_GROUP_NAME"
SUBDOMAIN="ENTER_YOUR_SUBDOMAIN"
/usr/bin/defaults write /Library/MonitoringClient/ClientSettings ClientGroup -string "$GROUP_NAME"
/usr/bin/curl -L1 https://$SUBDOMAIN.monitoringclient.com/downloads/MonitoringClient.pkg -o /tmp/MonitoringClient.pkg
/usr/sbin/installer -target / -pkg /tmp/MonitoringClient.pkg
/bin/rm /tmp/MonitoringClient.pkg
exit 0
]]></string>
<key>installcheck_script</key>
<string><![CDATA[#!/bin/zsh
autoload is-at-least
SUBDOMAIN="ENTER_YOUR_SUBDOMAIN"
wmsubdomain="$(defaults read /Library/MonitoringClient/ClientSettings Subdomain)"
wmversion="$(defaults read /Library/MonitoringClient/ClientSettings Client_Version)"
wmversionmimimum="7.0"
if [ -e /Library/MonitoringClient/RunClient ] &&
[[ $wmsubdomain == "$SUBDOMAIN" ]] &&
is-at-least $wmversionmimimum $wmversion
then
exit 1
else
exit 0
fi
#EXIT 0 TO INSTALL, EXIT 1 TO SKIP IT
]]></string>
<key>unattended_install</key>
<true/>
<key>unattended_uninstall</key>
<true/>
<key>version</key>
<string>1.0</string>
<key>uninstall_method</key>
<string>uninstall_script</string>
<key>uninstall_script</key>
<string>#!/bin/bash
/Library/MonitoringClient/RemoveClient -F
exit 0
</string>
<key>uninstallable</key>
<true/>
</dict>
</plist>