Skip to content

Instantly share code, notes, and snippets.

@arubdesu
arubdesu / JSSImporter.md
Last active January 1, 2016 19:29
Introducing JSSImporter

Autopkg is a project born out of the need to automate one of the more tedious tasks that face Mac Admins: figuring out when a piece of software has been updated, downloading it, and doing whatever it takes to make that software 'live' in your distribution or management system of choice. Munki was designed more recently than some other software distribution systems, and started out with the concept of 'tracks' or phases a piece of software will go through before it is offered to all of the clients participating in the system. Autopkg can integrate with it by simply copying the downloaded package into the repo, among other actions that have the potential of offering the software to clients immediately.

The JAMF Casper suite has many similar features, but as it was built under different circumstances it has other considerations and steps one would use when approaching the same set of tasks. Autopkg does not consider one software distribution system more special than another, and presents an open framework for f

@arubdesu
arubdesu / results
Created January 17, 2014 08:04
Jan17th update to recipes, current status is only Reader is failing - how MSOffice updates work without a declared version I'm not sure, these all rely on the upstream 'official' autopkg/recipes repo's pkg recipes...
The following recipes failed:
AdobeReader.jss
JSSImporter requires missing argument version
The following packages were built:
Identifier Version Pkg path
---------- ------- --------
com.adiumX.adiumX.pkg 1.5.9 /Users/arubdesu/Library/AutoPkg/Cache/com.github.autopkg.jss.Adium/Adium-1.5.9.pkg
com.adobe.pkg.AIR 4.0.0.1390 /Users/arubdesu/Library/AutoPkg/Cache/com.github.autopkg.jss.AdobeAIR/AdobeAIR-4.0.0.1390.pkg
N/A N/A /Users/arubdesu/Library/AutoPkg/Cache/com.github.autopkg.jss.AdobeFlashPlayer/AdobeFlashPlayer-12.0.0.38.pkg
<?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>Identifier</key>
<string>local.jss.Firefox</string>
<key>Input</key>
<dict>
<key>CATEGORY</key>
<string>%NAME%</string>
@arubdesu
arubdesu / makefile
Last active September 4, 2021 18:02
Luggage makefile-generated pkg to drop dummy receipts in place which stop prompt to update/adopt Mac AppStore apps (in this case for iLife without Garageband)(may also need to wipe /var/db/.MASManifest, as per @jessepeterson)
USE_PKGBUILD=1
include /usr/local/share/luggage/luggage.make
TITLE=iWorkDummyReceipts
REVERSE_DOMAIN=org.my.iWorkDummyReceipts
PACKAGE_VERSION=0.1
PAYLOAD=pack-iWorkDummyReceipts
pack-iWorkDummyReceipts: l_Applications
@sudo mkdir -p -m 755 ${WORK_D}/Applications/{Numbers,Pages,Keynote}.app/Contents/_MASReceipt
@sudo touch ${WORK_D}/Applications/{Numbers,Pages,Keynote}.app/Contents/_MASReceipt/receipt
@arubdesu
arubdesu / Makefile
Last active August 29, 2015 14:00 — forked from anonymous/makefile-v1
USE_PKGBUILD=1
include /usr/local/share/luggage/luggage.make
TITLE=scriptRunnerPkg
REVERSE_DOMAIN=com.grahamgilbert
PAYLOAD=\
pack-scriptRunner
pack-scriptRunner: l_usr_local_bin
@sudo ${CP} ./scriptRunner.py ${WORK_D}/usr/local/bin/scriptRunner.py
@sudo chmod 755 ${WORK_D}/usr/local/bin/scriptRunner.py
@arubdesu
arubdesu / csvToDS.py
Created May 21, 2014 14:40
Using a csv and a template to generate computer record in DeployStudio, specifically creates users with password 'password'
#!/usr/bin/python
import os
import csv
from Foundation import NSMutableDictionary
top_dict = NSMutableDictionary.dictionary()
# f = open(sys.argv[1], 'rt')
f = open('tehCSV.csv', 'rt')
try:
@arubdesu
arubdesu / ProcessorTemplate.py
Created May 25, 2014 18:38
Autopkg processor template, starting point to fit code into
#!/usr/bin/env python
#
# Copyright 2014 Your Name Here
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@arubdesu
arubdesu / scLikesDownloader.py
Last active August 29, 2015 14:04
Utility to 1. find your soundcloud UID 2. create a folder for downloads(if not there, ~/Music/SndCldDwnlds) 3. look through the past 50 likes for your user to find download url's and 4. download 'em. Requires soundcloud module, installable via pip
#!/usr/bin/env python
# This tool checks your last 50 likes for downloadable files,
# then puts them in your Music folder, which it will check
# against on subsequent fetches.
import soundcloud, os, sys, urllib2, re
# Create this by making an app on the Soundcloud dev site
my_api_id = "xxxxxxxxxxxxxxxxxxxxxxx"
# you should know this...
@arubdesu
arubdesu / gist:58d56c120d93f569b6d6
Created October 8, 2014 18:10
selling PE to security team
Even with the JAMF suite available, our remote management tools have not enabled efficiently taking inventory over the WAN or implementing an optimized patch management system. It also is used primarily on client workstations for just Macs, with the breadth of what Apple mostly covers when it comes to provided support, instead of fine-grained customization and server-grade functionality.
Puppet adds not only its core competency as a configuration management tool, which allows in-depth but hands-off auditing, but also, over the maturation of the Puppet Enterprise product, it's added a WAN-optimized orchestration tool. This mix of 'client checks in' and 'ad-hoc, on-demand, over-the-WAN execution’ makes it the leader in its space. We also would be able to leverage its certificate authority, which has been utilized in many environments to secure communication of the Managed Software Center tool which provides the most efficient 'self-service' model of patch management for Macs. The AIX/UNIX/Linux and SCCM teams
@arubdesu
arubdesu / his.plist
Last active August 29, 2015 14:07
why can't they just make their software work.pleaserun
<?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>Label</key>
<string>com.ittvis.lmgrd</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>