root / tea4cups / trunk / tea4cups.conf @ 597

Revision 597, 4.8 kB (checked in by jerome, 19 years ago)

Did some work for pre and post hooks

  • Property svn:keywords set to Auth Date Id Rev
Line 
1# $Id$
2#
3# Tea4CUPS : Tee for CUPS
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18#
19#
20
21# First we set all top-level directives in the [global] section
22[global]
23
24# Should we log debugging information to CUPS' error_log file ?
25# defaults to No if unset.
26debug : yes
27
28# In which directory will we create our files ? It must already exist !
29# This directive MUST be present since there's no sane default value.
30# Can be set either in the [global] section or any print queue section.
31# The value defined in a print queue section takes precedence over the
32# value defined in the [global] section.
33directory : /var/spool/cups/
34
35# Should Tea4CUPS keep the files it creates once all tees have ended ?
36# Defaults to No if unset, meaning that files are automatically deleted
37# once all tees have ended.
38# Can be set either in the [global] section or any print queue section.
39# The value defined in a print queue section takes precedence over the
40# value defined in the [global] section.
41# BEWARE : this may use huge amounts of disk space !
42# keepfiles : yes
43
44# Should we serialize the launch of all tees : launch one tee after
45# the other to save some system resources.
46# Defaults to No if unset, meaning that all tees are launched in
47# parallel.
48# Can be set either in the [global] section or any print queue section.
49# The value defined in a print queue section takes precedence over the
50# value defined in the [global] section.
51# This value also applies to prehooks and posthooks (see below)
52# serialize : yes
53
54# When executing the contents of a tee, prehook or posthook directive,
55# tea4cups makes the following environment variables available to your
56# own commands :
57#
58# TEAPRINTERNAME : The print queue name.
59# TEADIRECTORY : Tea4CUPS output directory.
60# TEADATAFILE : Full name of Tea4CUPS work file (in $TEADIRECTORY).
61# TEAJOBSIZE : Job's size in bytes.
62# TEAMD5SUM : MD5 sum of the job's datas.
63# TEACLIENTHOST : Client's hostname or IP address.
64# TEAJOBID : Job's Id.
65# TEAUSERNAME : Name of the user who launched the print job.
66# TEATITLE : Job's title.
67# TEACOPIES : Number of copies requested.
68# TEAOPTIONS : Options of the print job.
69# TEAINPUTFILE : Print job's data file or empty when job read from stdin.
70#
71# Your own commands will mostly be interested in TEADATAFILE which is
72# the name of the file from which your commands may extract the final
73# job's datas.
74       
75# Now defines some default tees which will always be launched
76# at the same time that the job's datas are being sent to the
77# printer.
78# The tee names are completely free BUT THEY MUST BEGIN WITH 'tee_'
79#
80# These are just some stupid examples.
81#tee_0 : cat $TEADATAFILE >/tmp/$TEAJOBID.prn
82#tee_pdf : cat $TEADATAFILE | su -c "lp -dPDFGenerator" $TEAUSERNAME
83
84# Some hooks : prehooks and posthooks
85#
86# Contrary to tees, prehooks are guaranteed to be launched
87# BEFORE the job's datas are sent to the printer, and
88# posthooks are guaranteed to be launched AFTER the job's
89# datas have been sent to the printer.
90#
91# prehook names are completely free BUT THEY MUST BEGIN WITH 'prehook_'
92# posthook names are completely free BUT THEY MUST BEGIN WITH 'posthook_'
93#
94# An additionnal environment variable is made available to posthooks,
95# named TEASTATUS which contains the exitcode of the real CUPS backend.
96# The normal value is 0, meaning that the real CUPS backend exited
97# successfully. Any other value indicates that a problem occured
98# in the CUPS backend which handles the transmission of the job
99# to the printer.
100#
101# prehook_0 : echo "Your print job has been accepted" | smbclient -M $TEAUSERNAME
102# posthook_0 : echo "Your print job has been printed" | smbclient -M $TEAUSERNAME
103
104
105# Sample section for print queue HP2100
106# Uncomment and adapt to your needs.
107#
108#[HP2100]
109#
110# By using a same tee name as in the [global] section, the new
111# value takes precedence
112#tee_0 : cat $TEADATAFILE >~$TEAUSERNAME/savejobs/$TEAJOBID.prn
113# An empty value deletes a value defined in the [global] section
114# so this particular tee doesn't get executed.
115#tee_pdf :
116# A reflector which produces 4 copies each time :
117#tee_4copies : lp -dotherprinter -n4 $CUPSDATAFILE
118# A simple accounting mechanism
119#tee_accounting : echo $TEAPRINTERNAME $TEAJOBID $TEAUSERNAME `pkpgcounter $TEADATAFILE` >/var/log/printaccounting.log
Note: See TracBrowser for help on using the browser.