]> git.ipfire.org Git - thirdparty/squid.git/blob - helpers/url_rewrite/fake/url_fake_rewrite.sh
Add url_rewrite helper section
[thirdparty/squid.git] / helpers / url_rewrite / fake / url_fake_rewrite.sh
1 #!/bin/sh
2 #
3 # Author: Amos Jeffries <squid3@treenet.co.nz>
4 #
5 # This code is copyright (C) 2009 by Treehouse Networks Ltd
6 # of New Zealand. It is published and Licensed as an extension of
7 # squid under the same conditions as the main squid application.
8 #
9
10 if test "${1}" = "-d" ; then
11 echo "Usage: $0 [-h] [-d logfile]"
12 echo " -h Help: this help text"
13 echo " -d logfile Debug: log all data received to the named file"
14 exit 1
15 fi
16
17 DEBUG=0
18 if test "${1}" = "-d" ; then
19 DEBUG=1
20 LOG="${2}"
21 fi
22
23 while read url rest; do
24 if test ${DEBUG} ; then
25 echo "$url $rest" >>${LOG}
26 fi
27 echo # blank line for no change, or replace with another URL.
28 done