Created
March 20, 2014 02:17
-
-
Save bryanzak/9655953 to your computer and use it in GitHub Desktop.
Creating a profile (and installer package) from a plist. This gist has a number of pieces. From a plist it creates a profile and from the profile it creates an installer package. There are create shell scripts for each step and the installer package also has a postinstall script that installs the profile. In this particular example we're creatin…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>AutoOpenSafeDownloads</key> | |
<false/> | |
<key>ManagedPlugInPolicies</key> | |
<dict> | |
<key>com.adobe.acrobat.pdfviewerNPAPI</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.adobe.director.shockwave.pluginshim</key> | |
<dict> | |
<key>PlugInDisallowPromptBeforeUseDialog</key> | |
<true/> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.adobe.director_12_0.shockwave.pluginshim</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.apple.QuickTime Plugin.plugin</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.macromedia.Flash Player.plugin</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.microsoft.SilverlightPlugin</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
<key>PlugInRunUnsandboxedOnFirstVisit</key> | |
<true/> | |
</dict> | |
<key>com.oracle.java.JavaAppletPlugin</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.safariMontage.safariMontageInfo</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.safariMontage.safariMontagePlayer</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.safarimontage.montageconnectplugin-ns</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>net.telestream.wmv.plugin</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
</dict> | |
</dict> | |
</plist> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VERSION="1.1" | |
# this script should be in a folder along with two additional folders | |
# Payload | |
# SafariPlugInPrefs.mobileconfig | |
# Scripts | |
# postinstall | |
source_path=$(dirname "${0}") | |
cd "${source_path}/Payload" | |
sudo chown root:wheel SafariPlugInPrefs.mobileconfig | |
cd "${source_path}" | |
sudo pkgbuild --identifier org.yourorg.profile.safaripluginprefs.pkg \ | |
--version "${VERSION}" \ | |
--scripts "Scripts" \ | |
--ownership recommended \ | |
--root "Payload" \ | |
--install-location "/tmp" \ | |
"SafariPlugInPrefs ${VERSION}.pkg" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Requires mcxToProfile.py | |
# https://github.com/timsutton/mcxToProfile | |
source_path=$(dirname "${0}") | |
cd "${source_path}" | |
./mcxToProfile.py --plist ./com.apple.Safari.plist --identifier "SafariPlugInPrefs" --manage "Always" --displayname "Safari PlugIn Prefs" --organization "Your Organization" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /tmp | |
profiles -I -F SafariPlugInPrefs.mobileconfig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>PayloadContent</key> | |
<array> | |
<dict> | |
<key>PayloadContent</key> | |
<dict> | |
<key>com.apple.Safari</key> | |
<dict> | |
<key>Forced</key> | |
<array> | |
<dict> | |
<key>mcx_preference_settings</key> | |
<dict> | |
<key>AutoOpenSafeDownloads</key> | |
<false/> | |
<key>ManagedPlugInPolicies</key> | |
<dict> | |
<key>com.adobe.acrobat.pdfviewerNPAPI</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.adobe.director.shockwave.pluginshim</key> | |
<dict> | |
<key>PlugInDisallowPromptBeforeUseDialog</key> | |
<true/> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.adobe.director_12_0.shockwave.pluginshim</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.apple.QuickTime Plugin.plugin</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.macromedia.Flash Player.plugin</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.microsoft.SilverlightPlugin</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
<key>PlugInRunUnsandboxedOnFirstVisit</key> | |
<true/> | |
</dict> | |
<key>com.oracle.java.JavaAppletPlugin</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.safariMontage.safariMontageInfo</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.safariMontage.safariMontagePlayer</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>com.safarimontage.montageconnectplugin-ns</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
<key>net.telestream.wmv.plugin</key> | |
<dict> | |
<key>PlugInFirstVisitPolicy</key> | |
<string>PlugInPolicyAllowNoSecurityRestrictions</string> | |
</dict> | |
</dict> | |
</dict> | |
</dict> | |
</array> | |
</dict> | |
</dict> | |
<key>PayloadEnabled</key> | |
<true/> | |
<key>PayloadIdentifier</key> | |
<string>MCXToProfile.3f0559ae-1fc2-4875-905a-d0bad4a9e579.alacarte.customsettings.534d1246-5344-4a4e-9c9e-7b0d4a8bd391</string> | |
<key>PayloadType</key> | |
<string>com.apple.ManagedClient.preferences</string> | |
<key>PayloadUUID</key> | |
<string>534d1246-5344-4a4e-9c9e-7b0d4a8bd391</string> | |
<key>PayloadVersion</key> | |
<integer>1</integer> | |
</dict> | |
</array> | |
<key>PayloadDescription</key> | |
<string>Included custom settings: | |
com.apple.Safari | |
</string> | |
<key>PayloadDisplayName</key> | |
<string>Safari PlugIn Prefs</string> | |
<key>PayloadIdentifier</key> | |
<string>SafariPlugInPrefs</string> | |
<key>PayloadOrganization</key> | |
<string>Omaha Public Schools</string> | |
<key>PayloadRemovalDisallowed</key> | |
<true/> | |
<key>PayloadScope</key> | |
<string>System</string> | |
<key>PayloadType</key> | |
<string>Configuration</string> | |
<key>PayloadUUID</key> | |
<string>3f0559ae-1fc2-4875-905a-d0bad4a9e579</string> | |
<key>PayloadVersion</key> | |
<integer>1</integer> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment