[plug] I think I broke it: Was:I've got my two computers going...thanks for assistance

Matt Kemner zombie at networx.net.au
Fri Nov 13 10:05:45 WST 1998


On Thu, 12 Nov 1998, David Buddrige wrote:

> I managed to figure out what the problem was - Squid _was_ loading at 
> boot-time, however since (at the time of load), the ppp link to the 
> internet was not yet up, it immediately failed with a dns error... Does 
> anyone have any ideas on how to resolve this particular problem?

I think Ian suggested the "-D" option to tell Squid not to do dns lookups.

>  What 
> I've done for the moment is set up a very basic script which boots squid 
> (manually) once the system has loaded and logged in - but I must type 
> the name of this script to get it to run after booting the computer... 

You could also get squid to load automatically when you dialin, and exit
when you logoff - saves some RAM while you're not logged in, but it means
you have to wait for squid to finish loading after you've logged in,
before you can start surfing.
To do this, add the following lines to your /etc/ppp/ip-up
(assuming #!/bin/sh)

if ! `ps auwx|grep -v grep|grep -q squid`
then
  /usr/local/squid/bin/squid
fi

And add "kill `cat /usr/local/squid/logs/squid.pid`" to your
/etc/ppp/ip-down

Replace "/usr/local/squid/bin" and "/usr/local/squid/logs" with the
location of those directories on your system.

> ideally I'd like it to load automatically... ( maybe a cron job which 
> check if squid is running and if not, then loads it?  - but then, I 
> don't know how I might tell (in a script) whether or not squid is 
> running...)

If you put the 3 lines I said to put in ip-up in a script on it's own, and
run that script from cron periodically, it will keep squid running for
you.  I actually run a script on several of my clients' internet gateways
that checks for the existance of pppd, and squid, to keep their link
alive, and run the cronscript during business hours, and run a hangup
script at the end of business hours.

 - Matt Kemner
System Administrator/BOFH        "Words are too feeble,
Networx Internet                  they cannot contain"
(08) 9 345 3377                   Live, "Stage"



More information about the plug mailing list