Skip to content

Instantly share code, notes, and snippets.

View grahampugh's full-sized avatar

Graham Pugh grahampugh

View GitHub Profile
@grahampugh
grahampugh / pkg_upload_aws_cdp.sh
Created March 6, 2024 20:40
A script to upload packages to a Jamf Pro Cloud Distribution Point hosted on AWS S3. Use --help for options.
#!/bin/bash
: <<DESCRIPTION
AWS S3 CDP package upload script
by Graham Pugh (@grahamrpugh)
1. Check for an existing package from the Classic API
2. Upload package to CDP if it's new or changed (this is tested by aws-cli using the sync command)
3. Upload the package metadata
@grahampugh
grahampugh / pkg_upload_jcds2.py
Created August 21, 2023 15:32
Upload a package to Jamf's JCDS2
#!/usr/bin/env python3
"""
A script to upload a package to the Jamf Cloud Distribution Point S3 bucket (JCDS 2.0)
Requirements from pip
boto3
requests
"""
@grahampugh
grahampugh / api_test_pkg_jcds2.sh
Last active March 25, 2024 23:25
JCDS2 package upload script
#!/bin/bash
: <<DESCRIPTION
JCDS2 package upload script
by Graham Pugh (@grahamrpugh)
1. Get a bearer token
2. Check for an existing package from the Classic API
3. Check for an existing package from the JCDS endpoint
4. Check that the checksum matches our local pkg
@grahampugh
grahampugh / GoogleChrome.mobileconfig
Created May 25, 2022 21:34
GoogleChrome profile to force updates
<?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>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>com.google.Chrome</key>
@grahampugh
grahampugh / PolicyTemplate.xml
Last active February 25, 2023 12:34
A fully edited Jamf policy template for JamfUploader
<?xml version="1.0" encoding="UTF-8"?>
<policy>
<general>
<name>%POLICY_NAME%</name>
<enabled>true</enabled>
<frequency>Ongoing</frequency>
<category>
<name>%POLICY_CATEGORY%</name>
</category>
</general>
@grahampugh
grahampugh / Policy-required-keys-only.xml
Last active May 25, 2022 19:51
A downloaded Jamf policy with unnecessary keys and IDs removed.
<?xml version="1.0" encoding="UTF-8"?>
<policy>
<general>
<name>Install Latest Adium</name>
<enabled>true</enabled>
<frequency>Ongoing</frequency>
<category>
<name>Testing</name>
</category>
</general>
@grahampugh
grahampugh / Policy-download.xml
Last active May 25, 2022 19:44
An example downloaded Jamf policy
<?xml version="1.0" encoding="UTF-8"?>
<policy>
<general>
<id>133</id>
<name>Install Latest Adium</name>
<enabled>true</enabled>
<trigger>USER_INITIATED</trigger>
<trigger_checkin>false</trigger_checkin>
<trigger_enrollment_complete>false</trigger_enrollment_complete>
<trigger_login>false</trigger_login>
@grahampugh
grahampugh / JamfPolicyTemplate.xml
Created May 13, 2022 08:45
PolicyTemplate for a "standard" .jamf recipe
<?xml version="1.0" encoding="UTF-8"?>
<policy>
<general>
<name>%POLICY_NAME%</name>
<enabled>true</enabled>
<frequency>Ongoing</frequency>
<category>
<name>%POLICY_CATEGORY%</name>
</category>
</general>
@grahampugh
grahampugh / JamfSmartGroupTemplate.xml
Created May 13, 2022 08:35
SmartGroupTemplate for a "standard" .jamf recipe
<?xml version="1.0" encoding="UTF-8"?>
<computer_group>
<name>%GROUP_NAME%</name>
<is_smart>true</is_smart>
<criteria>
<criterion>
<name>Application Title</name>
<priority>0</priority>
<and_or>and</and_or>
<search_type>is</search_type>
@grahampugh
grahampugh / Firefox.jamf.recipe
Created May 13, 2022 08:27
Firefox.jamf in PLIST format
<?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 the latest version of Firefox and makes a pkg. Then, uploads the package to the Jamf Pro Server and creates a Self Service Policy and Smart Group.
</string>
<key>Identifier</key>
<string>com.example.jamf.Firefox</string>
<key>Input</key>