You could make an Extension Attribute that just runs an lpstat -p command.
It will pull all local printers and their respective status.
You could also do something like:
lpstat -p | grep -EB1 "Paused"
You'd have to experiment with that in your environment, but it should return something like the following, provided any printers are disabled, otherwise will return a null value:
printer Phaser_8500DT disabled since Tue Apr 2 17:55:31 2013 -
Paused
HTH.
Edit: Just one other thought, if you decided to use the above as an EA, you could set up a Smart Group for any Macs reporting in with any non blank value in the Extension Attribute and have the JSS email you on changes to that group. That should, in theory get you close to what you're looking for.
!/bin/bash
scutil --get LocalHostName > paused.txt
lpstat -p | awk '{print $2}'| while read printer
do
if sudo lpstat -p | grep disabled > /dev/null; then
cancel -a-
cupsdisable $printer
sleep 2
cupsenable $printer
sleep 2
echo $printer >> paused.txt
mailx -s "A Printer has been Reset on the following iMac/Macbook" someemailaddress < paused.txt
else
exit
fi
done
hth
LSinNY
Thanks for the input! I've never really used extension attributes, but that seems like an interesting way to go. I like the idea of using a Smart Group to monitor changes. Would the input type be "populated by script"?
LSinNY: awesome, thanks so much!
Does your scrip actually reset the printer?