Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#
# Printer Destroyer Script
# Freddie Cox - January 2016 for Knox County Schools
#
# Use Paramter 4 on JSS Script to remove a specific IP address.
echo "[INFO] printer_destroyer script. Parameter 4 Value: ${4}"
# Get full list of printers & search for socket connection using IP
printer=$(lpstat -s | grep 'socket.*'${4} | awk -F'/' '{print $3}')
@FredCox3
FredCox3 / cfgutil
Created October 9, 2015 11:27
cfgutil man page
demo-computer% cfgutil
Options:
[-C | --certificate] <argument>
Path to DER-encoded certificate of supervising organization.
[-K | --private-key] <argument>
Path to DER-encoded private key of supervising organization.
[-e | --ecid] <argument>
@FredCox3
FredCox3 / cfgutil help exec
Created October 9, 2015 11:15
cfgutil man page
cfgutil help exec
exec
Usage: exec [-a <path to attach script>] [-d <path to detach script>]
Run a script when devices attach or detach.
These environment variables will be set:
- ECID: Target device's ECID.
- PATH: The path will be changed to include cfgutil.
@FredCox3
FredCox3 / gist:c5ec8acc35f7497e8544
Created July 8, 2015 19:08
JAMF Customizing the Casper Suite Session
# API Resouces
## Built In JSS Documentation
https://yourjss.comL:8443/api
## Bryson Tyrell's Blog
https://bryson3gps.wordpress.com/2014/03/30/the-jss-rest-api-for-everyone/
## Shea Craig's Python JSS
https://github.com/sheagcraig/python-jss