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

From: Daniel Barron <squidusers@dont-contact.us>
Date: Wed, 04 Jul 2001 16:52:43 +0100

In message <Pine.BSF.4.33.0107040853300.31328-100000@guru.citec.qld.gov.au>
          Colin Campbell <sgcccdc@citec.qld.gov.au> wrote:

> Hi,
>
> I am going to have to ask some dumb questions here (inline).
>

OK.

[snip]
>
> Define "won't work".

I did in a different email. However, you /are/ helping /me/. The perl
redirector does not redirect. squidGuard appears still to work though.
Individually they work, but not piped together with the sh redirector.

>
> >
> > /etc/squid/redirector.sh:
> > #!/bin/sh
> > /usr/local/bin/squidGuard -c /etc/squidGuard/conf/squidGuard.conf | /etc/squid/redirector.pl
>
> What happens if you type
>
> /usr/local/bin/squidGuard -c /etc/squidGuard/conf/squidGuard.conf | /etc/squid/redirector.pl
>
> on the command line and then start typing stuff?

If I do /usr/local/bin/squidGuard -c /etc/squidGuard/conf/squidGuard.conf on
the command line any line I type returns as blank including banned sites.

If I do /etc/squid/redirector.pl it modifies only the one site as expected
and otherwise returns what I erote.

Both together gives the same as just SG.

However, running SG from in squid.conf DOES work. It blocks as expected.

>
> >
> > /etc/squid/redirector.pl:
> > #!/usr/bin/perl
> > $|=1;
> > while (<>) {
> > s@http://www.bedmod.org.uk@http://www.bedmod.org.uk/index2.html@;
> > print;
> > }
>
> I can see no reason this won't work.

Neither do I :(

>
> >
> > 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.
>
> There is really no difference betwen command line and pipe. All that
> happens is that STDOUT of squidguard gets redirected to STDIN of
> redirector.
>
> What happens if you run:
>
> /usr/local/bin/squidGuard -c /etc/squidGuard/conf/squidGuard.conf | sed 's/^/SED: /'
>
> You should get whatever you type in massaged by squidguard and then
> prefixed by "SED: ".

I get nothing back, just a blank line.

-- 
Daniel Barron
Received on Wed Jul 04 2001 - 10:03:29 MDT

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