| 441 | # Pre and Post Hooks |
| 442 | # These directives allow the easy plug-in of any command of your choice |
| 443 | # at different phases of PyKota's execution. |
| 444 | # Pre and Post Hooks can access some of PyKota's internal information |
| 445 | # by reading environment variables as described below. |
| 446 | # The actual phase of PyKota's execution is available in the |
| 447 | # PYKOTAPHASE environment variable. |
| 448 | # Pre and Post Hooks can be defined either globally, per printer, |
| 449 | # or both if both are defined, the printer specific hook has |
| 450 | # priority. |
| 451 | # |
| 452 | # List of available environment variables : |
| 453 | # NB : Most of these variables are also available during the execution |
| 454 | # of external commands defined in the accounter, requester or mailto |
| 455 | # directives. |
| 456 | # |
| 457 | # PYKOTAPHASE : BEFORE or AFTER the job is sent to the printer |
| 458 | # PYKOTAUSERNAME : user's name |
| 459 | # PYKOTAPRINTERNAME : printer's name |
| 460 | # PYKOTAJOBID : job's id |
| 461 | # PYKOTATITLE : job's title |
| 462 | # PYKOTAFILENAME : job's filename |
| 463 | # PYKOTACOPIES : number of copies |
| 464 | # PYKOTAOPTIONS : job's options |
| 465 | # PYKOTABALANCE : user's account balance |
| 466 | # PYKOTALIFETIMEPAID : user's grand total paid |
| 467 | # PYKOTAPAGECOUNTER : user's page counter on this printer |
| 468 | # PYKOTALIFEPAGECOUNTER : user's life time page counter on this printer |
| 469 | # PYKOTASOFTLIMIT : user's soft page limit on this printer |
| 470 | # PYKOTAHARDLIMIT : user's hard page limit on this printer |
| 471 | # PYKOTADATELIMIT : user's soft to hard limit date limit on this printer |
| 472 | |
| 473 | # PreHook : gets executed after being sure the user, printer and user quota |
| 474 | # entry on the printer both exist in the PyKota database, but just before |
| 475 | # checking if the user is allowed to print or not. |
| 476 | # prehook has access to many environment variables : |
| 477 | # |
| 478 | # PYKOTAACTION contains either "ALLOW", "WARN" or "DENY" and |
| 479 | # represents the action which is to be done wrt the print job. |
| 480 | # PYKOTAPHASE contains 'BEFORE' during execution of prehook |
| 481 | # |
| 482 | # uncomment the line below to see what environment variables are available |
| 483 | # prehook: /usr/bin/printenv >/tmp/before |
| 484 | |
| 485 | # PostHook : gets executed after the job has been added to the history. |
| 486 | # posthook has access to all the environment variables defined above, |
| 487 | # as well as two additionnal environment variables : PYKOTAJOBPRICE |
| 488 | # and PYKOTAJOBSIZE. |
| 489 | # PYKOTAPHASE contains 'AFTER' during execution of posthook. |
| 490 | # |
| 491 | # uncomment the line below to see what environment variables are available |
| 492 | #posthook: /usr/bin/printenv >/tmp/after |
| 493 | |