G
So taking my last post about creating a Policy Banner. I’m going to use munki-pkg to create a pkg so I can deploy it to lab machines. Once you’ve downloaded munki-pkg. I moved the executable to /usr/local/bin so it’s in my search path. other wise you simply have to drag the executable to terminal to get the path.
To create a new project, open Terminal and run “munkipkg –create name_of_folder”. For me it looks like this.
cd ~/Desktop munkipkg --create PolicyBanner
That should create a new folder with the following:
– build (directory)
– build-info.plist
– payload (directory)
– scripts (directory)
build: Don’t touch this folder. This is where the newly creating package will go.
build-info.plist: This is a default template that should be edited. Open it in a text editor or Xcode. I typically edit “identifier” and change it to something appropriate for my company. Like, com.company.pkg.PolicyBanner. For other options check out the munki-pkg page for usage and instructions.
payload: Inside the payload folder create the folder structure you need. For my example it looks like: payload > Library > Security > PolicyBanner.rtfd
scripts: If you have a preinstall or postnatal script, put them in this folder with those exact names and make sure they are executable
Then open terminal and run the command, “munkipkg pathtofolder”, my example is:
munkipkg /Users/nscott/Desktop/PolicyBanner
You should see some random output and the terminal should come back to the prompt. Check the build folder. You should see a pkg file that can be deployed via your favorite software distribution tool (don’t forget to test, test, test).
That’s the quick and dirty. That’s it!
if you’ve never ventured into the world of packaging your own apps and scripts. Other tools can be very intimidating for beginners … so try munki-pkg and start packaging like a MacAdmin.