Payload-free package template

Payload-free packages are packages that exist only to run scripts. These are typically scripts you need to run a single time to perform a configuration task. They don’t install any files, thus the name “payload-free”. They are useful in workflows where you are installing packages like InstaDMG or any of the software distribution mechanisms that use packages. You can wrap your script into a payload-free package, and use the same mechanism you use to install software to deliver and run your script.

Here is a template payload-free package you can use to create custom payload-free packages for your own use.

To use it, duplicate it, rename it, and edit the following files:

payload-free.pkg/Contents/Info.plist – edit the CFBundleIdentifier, CFBundleShortVersion, and possibly the IFPkgFlagRestartAction.

payload-free.pkg/Contents/Resources/en.lproj/Description.plist – edit the IFPkgDescriptionDescription and IFPkgDescriptionTitle. Repeat for other languages if desired.

payload-free.pkg/Contents/Resources/postflight – put your script here. Make sure it’s marked as executable and starts with an appropriate “she-bang” line (#!/bin/sh or similar).

Explore posts in the same categories: Deployment, OS X

8 Comments on “Payload-free package template”

  1. [...] do your modifications in an easy-to-deploy pkg installer. See Greg Neagle’s (Creator of Munki)blog post on creating payload free [...]

  2. [...] packages were created using the payload-free-package-template by Greg Neagle < munki, packaging > « Managing Zabbix Agents with [...]

  3. [...] packages were created using the payload-free-package-template by Greg Neagle < munki, packaging > « Managing Zabbix Agents with [...]

  4. [...] You can then push this command out using Apple Remote Desktop, run it over SSH, install it with a payload-less package or even have something like Munki run the script for you. On the 318 Tech Journal, William [...]

  5. Simon Says:

    Hi Greg, I was wondering if you can help me fix the issue. I followed all the the steps to test a tiny script to see it in action [pmset -a disksleep 0]. However, when I run the package it does not seem to work although if I run the script ./postflight manually, it works.

    Any idea?

  6. [...] DeployStudio and Munki cannot currently install profiles themselves, a payload-free package should be created with it, using this command to install as a device [...]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 179 other followers

%d bloggers like this: