Skip to content

Instantly share code, notes, and snippets.

@apizz
Last active June 5, 2021 00:04
Show Gist options
  • Select an option

  • Save apizz/f5955da3f39e40766caedb3c9af63fa1 to your computer and use it in GitHub Desktop.

Select an option

Save apizz/f5955da3f39e40766caedb3c9af63fa1 to your computer and use it in GitHub Desktop.
Munki item preinstall script to create a ppd for an AirPrint printer to be used as part of a nopkg item. Meant to be used along with something like https://github.com/nmcspadden/PrinterGenerator
#!/bin/bash
# Use the built-in ipp2ppd tool to create a PPD file for AirPrint
PRINTER_IP="ENTER_PRINTER_IP"
PPD="/etc/cups/ppd/PRINTER_NAME.ppd"
EXE="/System/Library/Printers/Libraries/ipp2ppd"
AIR_PPD="/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/Resources/AirPrint.ppd"
# Create the PPD file
$EXE ipp://${PRINTER_IP} "$AIR_PPD" > "$PPD"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment