Skip to content

Instantly share code, notes, and snippets.

@joncrain
Last active October 30, 2019 14:20
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joncrain/a307d6ca5de4668d950e656080a75d1f to your computer and use it in GitHub Desktop.
Save joncrain/a307d6ca5de4668d950e656080a75d1f to your computer and use it in GitHub Desktop.
<?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>PayloadIdentifier</key>
<string>org.domain.kextpolicy</string>
<key>_metadata</key>
<dict>
<key>catalog_promotion_date</key>
<string>2018-11-01</string>
<key>created_by</key>
<string>user</string>
<key>creation_date</key>
<date>2018-10-31T17:22:15Z</date>
<key>munki_version</key>
<string>3.4.1.3557</string>
<key>os_version</key>
<string>10.13.6</string>
</dict>
<key>autoremove</key>
<false/>
<key>catalogs</key>
<array>
<string>testing</string>
</array>
<key>category</key>
<string>Profiles</string>
<key>description</key>
<string>Kernal Extension Policy</string>
<key>developer</key>
<string>IT</string>
<key>display_name</key>
<string>KEXT Policy</string>
<key>installcheck_script</key>
<string>#!/bin/sh
profile=org.domain.kextpolicy
check_profile=$(/usr/bin/profiles -L | grep $profile)
if [ -z "$check_profile" ]
then
exit 0
fi
exit 1</string>
<key>installer_item_hash</key>
<string>ea1012510965e1bb06c42cb16fec022881c291202ced853b2def1da90ba5f2d4</string>
<key>installer_item_location</key>
<string>profiles/org.domain.kextpolicy-1.0.mobileconfig</string>
<key>installer_item_size</key>
<integer>5</integer>
<key>installer_type</key>
<string>profile</string>
<key>minimum_munki_version</key>
<string>2.2</string>
<key>minimum_os_version</key>
<string>10.7</string>
<key>name</key>
<string>profile-kext_policy</string>
<key>preinstall_script</key>
<string>#!/bin/sh
udid=$(ioreg -d2 -c IOPlatformExpertDevice | awk -F\" '/IOPlatformUUID/{print $(NF-1)}')
export MICROMDM_ENV_PATH="/var/root/env"
/usr/local/micromdm/api/install_profile $udid "/Library/Managed Installs/Cache/org.domain.kextpolicy-1.0.mobileconfig"</string>
<key>requires</key>
<array>
<string>pkg-micromdm_prereqs</string>
</array>
<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
udid=$(ioreg -d2 -c IOPlatformExpertDevice | awk -F\" '/IOPlatformUUID/{print $(NF-1)}')
export MICROMDM_ENV_PATH="/var/root/env"
/usr/local/micromdm/api/remove_profile $udid "org.domain.kextpolicy"</string>
<key>uninstallable</key>
<true/>
<key>version</key>
<string>1.0</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment