Skip to content

Instantly share code, notes, and snippets.

@jaknz
jaknz / Generate Munki ClientConfig.scpt
Last active October 7, 2016 05:22
Borrowing heavily from Rich Trouton's Payload-Free Package Creator script at https://gist.github.com/rtrouton/2f84859894c3ad66c187#file-gistfile1-applescript to generate a package which will configure a Munki client.
on run
-- this repeat loop prevents empty strings from being submitted for the package name value
set q to 0
repeat while q is 0
set result to text returned of (display dialog "Enter the DNS name for your Munki server:" default answer "munki.local")
if result is not "" then
set munkiserver to result
set q to 1
end if
@jaknz
jaknz / cups_web_interface-1.0.plist
Created February 19, 2016 03:34
Enable Cups Web Admin via Munki
<?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>_metadata</key>
<dict>
<key>created_by</key>
<string>jaknz</string>
<key>creation_date</key>
<date>2015-07-31T00:54:58Z</date>
@jaknz
jaknz / EnableSSH_True-1.0.plist
Created February 11, 2016 21:58
Enable SSH via Munki
<?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>_metadata</key>
<dict>
<key>created_by</key>
<string>jaknz</string>
<key>creation_date</key>
<date>2015-11-12T00:54:58Z</date>
#!/bin/bash
# Change these to match your environment.
MANIFEST="standard"
REPONAME="munki_repo"
HOSTNAME="192.168.0.1"
USERNAME=$(who -m | awk {'print $1'})
if