Skip to content

Instantly share code, notes, and snippets.

Jon Crain joncrain

Block or report user

Report or block joncrain

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rum_update_product.sh
#!/bin/bash
# Application SAP Codes and versions found here: https://helpx.adobe.com/enterprise/package/help/apps-deployed-without-their-base-versions.html
# check if root
if [[ $EUID != 0 ]] ; then
echo "Remote Update Manager: Please run this as root, or via sudo."
exit -1
fi
View kext_policy.pkginfo
<?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>PayloadIdentifier</key>
<string>org.domain.kextpolicy</string>
<key>_metadata</key>
<dict>
<key>catalog_promotion_date</key>
<string>2018-11-01</string>
View tcc.pkginfo
<?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>PayloadIdentifier</key>
<string>com.example.tcc</string>
<key>_metadata</key>
<dict>
<key>catalog_promotion_date</key>
<string>2019-01-16</string>
@joncrain
joncrain / setup.sh
Last active Feb 7, 2019
New MunkiReport dev environment including a new module
View setup.sh
#!/bin/bash
dev_site_root=~/Documents/munkireport-awesome
module_name=awesome
git clone https://github.com/munkireport/munkireport-php.git $dev_site_root
cd $dev_site_root
#### Choose the branch to load:
# git checkout master
View linux_upgrade.py
#!/usr/bin/python
import os
import datetime
import subprocess
import json
import urllib
import urllib2
import shutil
import tarfile
@joncrain
joncrain / mr_upgrade_testing.sh
Created Apr 19, 2019
Pseudo-code script for testing out upgrades
View mr_upgrade_testing.sh
git clone -b v2.7.3 https://github.com/munkireport/munkireport-php.git ./test
cd ./test
cp config_default.php ./config.php
echo "\$conf['auth']['auth_noauth'] = array();" >> ./config.php
php -S localhost:8080 -t ./ # this will run site locally
### in another terminal run the following
sudo /bin/bash -c "$(curl -s http://localhost:8080/index.php?/install)"
sudo /usr/local/munki/preflight && /usr/local/munki/postflight
git pull origin master
# stop web server (it's served out of public now)
View erase_install_mojave.plist
<?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>OnDemand</key>
<true/>
<key>RestartAction</key>
<string>RequireRestart</string>
<key>_metadata</key>
<dict>
You can’t perform that action at this time.