This file contains 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/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}') |
This file contains 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
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> |
This file contains 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
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. |
This file contains 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
# 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 |