Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In my case, squid is started before DHCP has written a new /etc/resolv.conf which results in odd errors (timeouts, 504 Gateway) when I try to load a page in the web browser.

As I see it, the correct solution would be to start squid only after dhcpd/NetworkManager/whoever (?) has finished configuring the network.

share|improve this question
    
Which Ubuntu version are you using?. Or more concrete, are you using SysV or upstart?. –  Javier Rivera Mar 26 '12 at 12:20
    
I'm on 11.10 and upstart. –  Aaron Digulla Mar 26 '12 at 12:25
    
add comment

2 Answers 2

up vote 0 down vote accepted

You should modify the squid.conf file in /etc/init so that it only starts when network is up:

start on (started networking)

You can find much more info here, and looking at the files in your /etc/init/ dir.

This question should also help. If you prefer to configure it with a GUI, look here.

share|improve this answer
add comment

Hi i have got something for you , I am sure that gonna help you

http://stackoverflow.com/questions/4212453/how-to-force-service-starts-after-network-is-ready-in-ubuntu-10-04

share|improve this answer
    
Downvote: Ugly hack, the upstart system should be able to handle this more cleanly. –  Javier Rivera Mar 26 '12 at 12:35
    
oh thanks for reporting back . –  AgentCool Mar 26 '12 at 12:42
    
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference –  Mateo Jun 10 '12 at 19:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.