run script before and after printing?

jaqen cups at misc-tech.dk
Sat Dec 18 23:59:09 PST 2010


I was wondering if there is a way to have cups run a script before starting to print and then again once its done.

I have a remote controlled power switch (tellstick from www.telldus.com) that I'd like to use for turning on and off my printer, so its only on when needed.

so far my best idea has been to monitor the queue (using lpstat -o) and turn on once theres a queue. The problem being that the queue often empties before the printing is done, so I'll have to guess at how log to wait before turning it off again.

anyone have a better idea?




More information about the cups mailing list