Re: [squid-users] More than one type of redirector

From: Daniel Barron <squidusers@dont-contact.us>
Date: Mon, 25 Jun 2001 14:07:46 +0100

In message <3B33E4AF.E2C6A26@hem.passagen.se>
 Henrik Nordstrom <hno@hem.passagen.se> did write:

> Pipe them together.
>
> I.e. create your own custom redirector in the form of a small shell
> script
>
> #!/bin/sh
> redirector1 | redirector2
>
> --
> Henrik Nordstrom
> Squid Hacker

Oh no! It won't work. What I've got is the following:

/etc/squid/redirector.sh:
#!/bin/sh
/usr/local/bin/squidGuard -c /etc/squidGuard/conf/squidGuard.conf | /etc/squid/redirector.pl

/etc/squid/redirector.pl:
#!/usr/bin/perl
$|=1;
while (<>) {
        s@http://www.bedmod.org.uk@http://www.bedmod.org.uk/index2.html@;
        print;
}

And in squid.conf:
redirect_program /etc/squid/redirector.sh
redirect_children 5

Both redirector scripts are owned by squid.

squidGuard seems to still work. But the perl redirector won't work when
piped together, but it will run from the command line.

I've tried piping the perl to squidGuard and it still does not work.

Where am I going wrong?

-- 
Daniel Barron
Received on Mon Jun 25 2001 - 07:06:59 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:00:50 MST