#!/bin/bash

# Asegurar existencia del PPD
mkdir -p /etc/cups/ppd/
cp /usr/local/share/papercut.ppd /etc/cups/ppd/papercut.ppd

# Añadir la impresora si no existe
/usr/sbin/lpadmin -p "papercut" -v "smb://user:1234@simpr.intra.unizar.es/PAPERCUT" -m "drv:///postscript-hp/postscript-hp.ppd" -P "/etc/cups/ppd/papercut.ppd" -L "simpr.intra.unizar.es" -o "printer-is-shared=false" -E

