Skip to content

Instantly share code, notes, and snippets.

@opragel
Created June 3, 2015 00:31
Show Gist options
  • Save opragel/d3e783acfc04865cf1f9 to your computer and use it in GitHub Desktop.
Save opragel/d3e783acfc04865cf1f9 to your computer and use it in GitHub Desktop.
install-canon-c5235-printer.sh
#!/bin/bash
printerName="Canon_C5235"
printerDriver="/Library/Printers/PPDs/Contents/Resources/CNPZUIRAC5235ZU.ppd.gz"
printerAddress="lpd://0.0.0.0"
# This variable is the custom event trigger for driver install policy in JSS
driverInstallEvent="installCanonC5235driver"
# Theoretically no need to edit below here
if [ ! -f "$printerDriver" ]; then
jamf policy -event $driverInstallEvent
fi
lpadmin -p $printerName -E -v $printerAddress -P "$printerDriver"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment