root / tea4cups / trunk / tea4cups.conf @ 644

Revision 644, 5.8 kB (checked in by jerome, 19 years ago)

Removed all references to 'tees' from the sample configuration file
and documentation.
Updated the license because of the Free Software Foundation's new
snail mail address.
Reworded Peter's contributions in the CREDITS file.
Added missing copyright messages.

  • Property svn:keywords set to Auth Date Id Rev
Line 
1# $Id$
2#
3# Tea4CUPS : Tee for CUPS
4#
5# (c) 2005 Jerome Alet <alet@librelogiciel.com>
6# (c) 2005 Peter Stuge <stuge-tea4cups@cdy.org>
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20#
21#
22
23# First we set all top-level directives in the [global] section
24[global]
25
26# Should we log debugging information to CUPS' error_log file ?
27# defaults to No if unset.
28debug : yes
29
30# In which directory will we create our files ? It must already exist !
31# This directive MUST be present since there's no sane default value.
32# Can be set either in the [global] section or any print queue section.
33# The value defined in a print queue section takes precedence over the
34# value defined in the [global] section.
35# directory : /var/spool/tea4cups/
36directory : /var/spool/cups/
37
38# Should Tea4CUPS keep the files it creates once all hooks have ended ?
39# Defaults to No if unset, meaning that files are automatically deleted
40# once all hooks have ended.
41# Can be set either in the [global] section or any print queue section.
42# The value defined in a print queue section takes precedence over the
43# value defined in the [global] section.
44# BEWARE : this may use huge amounts of disk space !
45# keepfiles : yes
46
47# Should we serialize the launch of all hooks : launch one after
48# the other to save some system resources.
49# Defaults to No if unset, meaning that all hooks are launched in
50# parallel.
51#
52# NB : in any case, hooks' names are sorted alphabetically and
53# are launched in this sort order (obviously when launched in parallel
54# this is unnoticeable).
55#
56# Can be set either in the [global] section or any print queue section.
57# The value defined in a print queue section takes precedence over the
58# value defined in the [global] section.
59# serialize : yes
60
61# When executing the contents of a prehook or posthook directive,
62# tea4cups makes the following environment variables available to your
63# own commands :
64#
65# TEAPRINTERNAME : The print queue name.
66# TEADIRECTORY : Tea4CUPS output directory.
67# TEADATAFILE : Full name of Tea4CUPS work file (in $TEADIRECTORY).
68# TEAJOBSIZE : Job's size in bytes.
69# TEAMD5SUM : MD5 sum of the job's datas.
70# TEACLIENTHOST : Client's hostname or IP address.
71# TEAJOBID : Job's Id.
72# TEAUSERNAME : Name of the user who launched the print job.
73# TEATITLE : Job's title.
74# TEACOPIES : Number of copies requested.
75# TEAOPTIONS : Options of the print job.
76# TEAINPUTFILE : Job's data file or empty when job read from stdin.
77# TEABILLING : Job's billing code (lp -o job-billing=SomeCode file.ps)
78# TEACONTROLFILE : Job's IPP message file (usually /var/spool/cups/c?????)
79#
80# Your own commands will mostly be interested in TEADATAFILE which is
81# the name of the file from which your commands may extract the final
82# job's datas. Don't rely on TEAINPUTFILE, use TEADATAFILE instead
83# since the first one may be empty depending on your printer driver.
84       
85# Some hooks : prehooks and posthooks
86#
87# Prehooks are guaranteed to be launched
88# BEFORE the job's datas are sent to the printer, and
89# posthooks are guaranteed to be launched AFTER the job's
90# datas have been sent to the printer.
91#
92# prehook names are completely free BUT THEY MUST BEGIN WITH 'prehook_'
93# posthook names are completely free BUT THEY MUST BEGIN WITH 'posthook_'
94#
95# An additionnal environment variable is made available to posthooks,
96# named TEASTATUS which contains the exitcode of the real CUPS backend.
97# The normal value is 0, meaning that the real CUPS backend exited
98# successfully. Any other value indicates that a problem occured
99# in the CUPS backend which handles the transmission of the job
100# to the printer.
101#
102# prehook_0 : echo "Your print job has been accepted" | smbclient -M $TEAUSERNAME
103# posthook_0 : echo "Your print job has been printed with status $TEASTATUS" | smbclient -M $TEAUSERNAME
104#
105# NB : as a special feature, any prehook which exits with a -1 status (255)
106# causes the job to NOT be sent to the real backend, effectively cancelling it.
107# None of the posthooks gets executed in this case, but all
108# remaining prehooks are still executed.
109#
110#prehook_pdf : cat $TEADATAFILE | su -c "lp -dPDFGenerator" $TEAUSERNAME
111#posthook_0 : cat $TEADATAFILE >/tmp/$TEAJOBID.prn
112
113
114# Sample section for print queue HP2100
115# Uncomment and adapt to your needs.
116#
117#[HP2100]
118#
119# By using a same hook name as in the [global] section, the new
120# value takes precedence
121#posthook_0 : cat $TEADATAFILE >~$TEAUSERNAME/savejobs/$TEAJOBID.prn
122
123# An empty value deletes a value defined in the [global] section
124# so this particular hook doesn't get executed on this printer.
125#prehook_pdf :
126
127# A reflector which produces 4 copies each time :
128#posthook_4copies : lp -dotherprinter -n4 $CUPSDATAFILE
129
130# A simple accounting mechanism
131#prehook_accounting : echo $TEAPRINTERNAME $TEAJOBID $TEAUSERNAME $TEABILLING `pkpgcounter $TEADATAFILE` >/var/log/printaccounting.log
132
133# Some additionnal hooks to forbid duplicate jobs :
134# The prehook will use the history file to filter out duplicate jobs
135# checkdupes is an hypothetical command which exits -1 if the current print
136# job is a duplicate (same MD5 sum already found in history)
137#prehook_to_filter_duplicates : /usr/local/bin/checkdupes $TEAMD5SUM /tmp/jobmd5sums
138#posthook_to_filter_duplicates : echo "$TEAJOBID : $TEAMD5SUM" >>/tmp/jobmd5sums
Note: See TracBrowser for help on using the browser.