Changeset 675

Show
Ignore:
Timestamp:
06/27/06 14:26:13 (18 years ago)
Author:
jerome
Message:

Added empty lines to ease readability.
Added support for a 'retry' directive.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • tea4cups/trunk/tea4cups.conf

    r674 r675  
    2121# 
    2222 
     23 
     24 
    2325# First we set all top-level directives in the [global] section 
    2426[global] 
     27 
    2528 
    2629 
     
    3033 
    3134 
     35 
    3236# In which directory will we create our files ? It must already exist ! 
    3337# This directive MUST be present since there's no sane default value. 
     
    3539# The value defined in a print queue section takes precedence over the 
    3640# value defined in the [global] section. 
     41# 
    3742# directory : /var/spool/tea4cups/ 
    3843directory : /var/spool/cups/ 
     44 
    3945 
    4046 
     
    4652# value defined in the [global] section. 
    4753# BEWARE : this may use huge amounts of disk space ! 
     54# 
    4855# keepfiles : yes 
    4956 
    5057 
     58 
     59# Should we retry to send the job's datas to the real backend in the case 
     60# it fails ? The default when not set is to try to send the datas only once 
     61# to the real backend. 
     62# Can be set either in the [global] section or any print queue section. 
     63# The value defined in a print queue section takes precedence over the 
     64# value defined in the [global] section. 
     65# 
     66# Syntax : "retry: N,S" 
     67# 
     68#           N : number of times to try. If 0, will retry indefinitely, until 
     69#               the backend accepts all the datas without error.               
     70# 
     71#           S : delay in Seconds between two attempts. 
     72# 
     73# The example below would retry up to three times, at 60 seconds interval. 
     74#  
     75# retry : 3,60 
     76 
     77 
     78 
    5179# Should we launch some command when the real CUPS backend fails ? 
    5280# Can be set either in the [global] section or any print queue section. 
    5381# The value defined in a print queue section takes precedence over the 
    5482# value defined in the [global] section. 
     83# IMPORTANT : this directive is only taken into account when the number 
     84# of tries as defined in the 'retry' directive above have expired and 
     85# the real backend still fails. 
     86# 
    5587# onfail : echo "Original Backend failed" | /usr/bin/mail -s Tea4CUPS root 
     88 
    5689 
    5790 
     
    71104 
    72105 
     106 
    73107# Should we serialize the launch of all hooks : launch one after 
    74108# the other to save some system resources. 
     
    83117# The value defined in a print queue section takes precedence over the 
    84118# value defined in the [global] section. 
     119# 
    85120# serialize : yes 
     121 
    86122 
    87123 
     
    111147 
    112148 
     149 
    113150# Some prehooks and posthooks 
    114151# 
     
    140177 
    141178 
     179 
    142180# Sample section for print queue HP2100 
    143181# Uncomment and adapt to your needs. 
     
    147185# By using a same hook name as in the [global] section, the new 
    148186# value takes precedence 
     187# 
    149188#posthook_0 : cat $TEADATAFILE >~$TEAUSERNAME/savejobs/$TEAJOBID.prn 
     189 
    150190 
    151191 
    152192# An empty value deletes a value defined in the [global] section 
    153193# so this particular hook doesn't get executed on this printer. 
     194# 
    154195#prehook_pdf : 
    155196 
    156197 
     198 
    157199# A reflector which produces 4 copies each time : 
     200# 
    158201#posthook_4copies : lp -dotherprinter -n4 $CUPSDATAFILE 
    159202 
    160203 
     204 
    161205# A simple accounting mechanism 
     206# 
    162207#prehook_accounting : echo $TEAPRINTERNAME $TEAJOBID $TEAUSERNAME $TEABILLING `pkpgcounter $TEADATAFILE` >>/var/log/printaccounting.log 
    163208 
     
    172217# if they differ only by the value of the '%%CreationDate:' PostScript  
    173218# comment ! 
     219# 
    174220#prehook_to_filter_duplicates : /usr/local/bin/checkdupes $TEAMD5SUM /tmp/jobmd5sums 
    175221#posthook_to_filter_duplicates : echo "$TEAJOBID : $TEAMD5SUM" >>/tmp/jobmd5sums 
     222 
    176223 
    177224