updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / adzapper / adzapper.wrapper
blob98e9c56b80cc6e52e13b8119f939d03165d36836
1 #!/bin/sh
3 # Wrapper to set environment variables then exec the real zapper.
4 # The reasons for this are twofold:
5 # - for some reason squid doesn't preserve the original environment
6 # when you do a restart (or SIGHUP)
7 # - to avoid having to hack the squid startup script (if you have
8 # a presupplied one, such as ships with some linux distributions)
10 # Install in the same directory you put the zapper (just for convenience) and
11 # hack the pathnames below to suit.
12 # Note that you can skip this script and run the zapper with no environment
13 # settings at all and it will work fine; the variables are all set here merely
14 # for completeness so that customisation is easy for you.
15 # - Cameron Simpson <cs@zip.com.au> 21apr2000
17 # Script modified for Debian by Paul van Tilburg <paulvt@debian.org>.
19 # Script modified for ArchLinux by Manolis Tzanidakis <manolis@archlinux.org>.
22 # Path to the adzapper script/rediector:
23 zapper=/usr/bin/adzapper
25 # Read the configfile and set environment:
26 . /etc/adzapper/adzapper.conf
28 export ZAP_MODE ZAP_BASE ZAP_BASE_SSL ZAP_PREMATCH ZAP_POSTMATCH ZAP_MATCH
29 export STUBURL_AD STUBURL_ADSSL STUBURL_ADJS STUBURL_ADHTML STUBURL_ADMP3 \
30 STUBURL_ADPOPUP STUBURL_ADSWF STUBURL_COUNTER STUBURL_COUNTERJS \
31 STUBURL_WEBBUG STUBURL_WEBBUGJS STUBURL_PRINT
33 # Here, having arranged the environment, we exec the real zapper:
35 exec "$zapper"