Skip to content

Instantly share code, notes, and snippets.

@krispayne
Last active October 31, 2016 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krispayne/c8daa7e6603ec3df838fa19ec992a0f6 to your computer and use it in GitHub Desktop.
Save krispayne/c8daa7e6603ec3df838fa19ec992a0f6 to your computer and use it in GitHub Desktop.
#!/bin/bash
# check for a printer driver
# utilizes Casper parameters
PRINTER_DRIVER="${4}"
TRIGGER="${5}"
BASEPPD="/Library/Printers/PPDs/Contents/Resources"
if [[ ! -e "${BASEPPD}/${PRINTER_DRIVER}" ]]; then
echo "Installing driver from Casper..."
jamf policy -trigger ${5}
else
echo "Driver already exists, proceed."
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment