Skip to content

Instantly share code, notes, and snippets.

@erikng
Created March 9, 2017 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikng/5c7d8de76c5d33500757046bcd08c32f to your computer and use it in GitHub Desktop.
Save erikng/5c7d8de76c5d33500757046bcd08c32f to your computer and use it in GitHub Desktop.
distribution_custom.plist
<?xml version="1.0" encoding="utf-8"?>
<installer-gui-script minSpecVersion="1">
<pkg-ref id="com.googlecode.munki.admin"/>
<pkg-ref id="com.googlecode.munki.app"/>
<pkg-ref id="com.googlecode.munki.core"/>
<pkg-ref id="com.googlecode.munki.launchd"/>
<pkg-ref id="com.github.munki.pkg.munki_config"/>
<options customize="allow" allow-external-scripts="yes"/>
<domains enable_anywhere="true"/>
<installation-check script="requirerestart()"/>
<script>
function requirerestart() {
if (!(system.run('launchctl.py') == 1)) {
// == true is equal to return code 0. Therefore if your script returns 0 (aka true)
// return true to select all of the options or false to deselect.
return "None";
}
return "RequireRestart";
}
</script>
<choices-outline>
<line choice="default">
<line choice="com.googlecode.munki.admin"/>
<line choice="com.googlecode.munki.app"/>
<line choice="com.googlecode.munki.core"/>
<line choice="com.googlecode.munki.launchd"/>
<line choice="com.github.munki.pkg.munki_config"/>
</line>
</choices-outline>
<choice id="default"/>
<choice id="com.googlecode.munki.admin" visible="false">
<pkg-ref id="com.googlecode.munki.admin"/>
</choice>
<pkg-ref id="com.googlecode.munki.admin" version="2.9.0.3036" onConclusion="none">munkitools_admin-2.9.0.3036.pkg</pkg-ref>
<choice id="com.googlecode.munki.app" visible="false">
<pkg-ref id="com.googlecode.munki.app"/>
</choice>
<pkg-ref id="com.googlecode.munki.app" version="4.3.3035" onConclusion="none">munkitools_app-4.3.3035.pkg</pkg-ref>
<choice id="com.googlecode.munki.core" visible="false">
<pkg-ref id="com.googlecode.munki.core"/>
</choice>
<pkg-ref id="com.googlecode.munki.core" version="2.9.0.3036" onConclusion="none">munkitools_core-2.9.0.3036.pkg</pkg-ref>
<choice id="com.googlecode.munki.launchd" visible="false">
<pkg-ref id="com.googlecode.munki.launchd"/>
</choice>
<pkg-ref id="com.googlecode.munki.launchd" version="2.0.0.3019" onConclusion="none">munkitools_launchd-2.0.0.3019.pkg</pkg-ref>
<choice id="com.github.munki.pkg.munki_config" visible="false">
<pkg-ref id="com.github.munki.pkg.munki_config"/>
</choice>
<pkg-ref id="com.github.munki.pkg.munki_config" version="1.0" onConclusion="none">munki_config.pkg</pkg-ref>
</installer-gui-script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment