[cups] How to call a script when a job arrives

Daniel Spannbauer ds at marco.de
Fri Apr 5 01:30:18 PDT 2019


Am 05.04.2019 um 10:11 schrieb Marc Haber:
> Hi,
>
> I have a network printer that can be turned on by doing a certain curl
> call, and would like CUPS to turn the printer on automatically when a
> print job for this printer arrives.
>
> Must I do this in a filter or is there a more elegant place for this?
> How and where would I specify a filter that is used for all jobs for a
> certain printer?
>
> Greetings
> Marc
>
Hello Marc,


I write a script, name it like the printer and put it to the interfaces 
dir (at openSUSE: /etc/cups/interfaces/).

Mine would look like this:

-----------

#!/bin/bash

do_anything_to_wake_the_printer

cat $6

-------------

I think that should work.



Regards


Daniel



-- 
Daniel Spannbauer                         Systemadministration
marco Systemanalyse und Entwicklung GmbH  Tel   +49 8333 9233-27 Fax -11
Rechbergstr. 4-6, D 87727 Babenhausen     Mobil +49 171 4033220
http://www.marco.de/                      Email ds at marco.de
Geschäftsführer Martin Reuter             HRB 171775 Amtsgericht München



More information about the cups mailing list