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
% ./autopkg run Firefox.install -v | |
Processing Firefox.install... | |
MozillaURLProvider | |
MozillaURLProvider: Found URL http://ftp.mozilla.org/pub/mozilla.org//firefox/releases/latest/mac/en-US/Firefox%2031.0.dmg | |
URLDownloader | |
URLDownloader: Storing new Last-Modified header: Thu, 17 Jul 2014 03:38:41 GMT | |
URLDownloader: Storing new ETag header: "4b25e62-3c17d83-4fe5b607b1240" | |
URLDownloader: Downloaded /Users/gneagle/Library/AutoPkg/Cache/com.github.autopkg.install.Firefox_EN/downloads/Firefox.dmg | |
EndOfCheckPhase | |
AppDmgVersioner |
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 Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>catalogs</key> | |
<array> | |
</array> | |
<key>conditional_items</key> | |
<array> | |
<dict> |
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
# sudo managedsoftwareupdate -vvvv --applesus | |
Managed Software Update Tool | |
Copyright 2010-2014 The Munki Project | |
http://code.google.com/p/munki | |
Starting... | |
Performing preflight tasks... | |
preflight stdout: Preflight report submmitted for Greg-Neagle--tic. | |
NOTE: managedsoftwareupdate is configured to process Apple Software Updates only. | |
Checking Apple Software Update catalog... |
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/sh | |
# Master login hook script | |
# | |
# runs each script found in the login hooks directory | |
LOGINHOOKSDIR="/etc/hooks/login" | |
if [ -d ${LOGINHOOKSDIR} ]; then | |
for script in ${LOGINHOOKSDIR}/* ; do |
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
#!/usr/bin/python | |
# Demo of determinining if a Google account has 2FA active | |
# Needs a Google account ID (email address) and a password | |
# If the password is the "main" password (not an app-specific password) | |
# and "Two-factor authentication required" is returned; then 2FA is active | |
import urllib | |
import urllib2 |
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
% softwareupdate -l | |
Software Update Tool | |
Copyright 2002-2012 Apple Inc. | |
Finding available software | |
Software Update found the following new or updated software: | |
* XProtectPlistConfigData-1.0 | |
XProtectPlistConfigData (1.0), 10K [recommended] | |
* Gatekeeper Configuration Data-54 | |
Gatekeeper Configuration Data (54), 3259K [recommended] |
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
import plistlib | |
import CoreFoundation | |
from Foundation import NSDate, NSMutableArray, NSMutableDictionary | |
# read the current ManagedPlugInPolicies | |
policy = CoreFoundation.CFPreferencesCopyAppValue("ManagedPlugInPolicies", "com.apple.Safari") | |
if policy: | |
# policy is an immutable dict, so we have to make a mutable copy | |
my_policy = NSMutableDictionary.alloc().initWithDictionary_copyItems_(policy, True) |
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
import CoreFoundation | |
from Foundation import NSDate | |
# read Safari's current ManagedPlugInPolicies | |
policy = CoreFoundation.CFPreferencesCopyAppValue( | |
'ManagedPlugInPolicies', 'com.apple.Safari') | |
if not 'com.oracle.java.JavaAppletPlugin' in policy: | |
# create an empty dict | |
policy['com.oracle.java.JavaAppletPlugin'] = {} |
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" standalone="no"?> | |
<installer-gui-script minSpecVersion="1"> | |
<options allow-install-later="true" should-authenticate-reboot="true" post-logout="true" should-launch-first-login-optimization="true"/> | |
<title>SU_TITLE</title> | |
<script/> | |
<volume-check script="VolumeCheck()"/> | |
<installation-check script="InstallationCheck()"/> | |
<script> | |
function compareBuildVersions(lhs, rhs) { | |
var lhsMatch = lhs.match(/([0-9]+)([A-Z])([0-9]+)([a-z])?/); |
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>Description</key> | |
<string>Downloads Firefox disk image, builds a package, including autoconfig | |
resources (typically as generated via the CCK2 tool), then imports the pkg into | |
your Munki repo. | |
Place the autoconfig.zip in the same directory as the recipe. You may |