Can't get squid to start automatically

I have just installed squid and sarg, both are working well.

I cannot get squid to start when the machine boots. I installed webmin and configured the setup through the webmin interface where I checked the “start at boot option”.

I think the problem is that my network card responsible for the web connection is wireless so when squid tries to load during boot it is trying before the Wireless card is up and so it fails.

I have tried multiple methods of adding a script to the “dispatcher.d” folder in “NetworkManager” to load squid after wlan0 is up but all have failed to bring up the squid proxy without my interaction. I have not found any two sites that describe the syntax for “dispatcher.d” alike so I may have the command wrong but I have no idea what to do.

I probably have 20 hours trying to get this service to run automatically and no luck. I am new to Linux so help that is explained it a way that I can understand how to apply it is hard to find.

Has anyone figured out a way to automatically execute a simple command (/etc/init.d/.squid start) after a regular user’s desktop is fully up?

Any help would be greatly appreciated.
I am running OpenSuse 11.2
Thank you fore looking!

You should enable start at boot using YaST. webmin may not understand the openSUSE way of doing things. I don’t know why people want to use webmin for this sort of thing when it’s supported in YaST.

squid should start fine even if you don’t have a network connection but you may have to provide a server name corresponding to the IP address it’s listening on. Look in the logs in /var/log/squid for clues after you have set it up to start at boot.

I did enable squid in Yast and it does load, the problem is it loads before the wireless interface is up so it does not function. I have to manually restart squid if I load it through the system runlevel option in yast so it is basically the same as if I wait for the desktop to come up and just run the start command.

I have told squid to look for the ip address of the router that will be providing the connection but unless the connection is already established squid will not start in a way that will function after the interface is up.

That is why I started looking for a way to execute the start command a few seconds after the desktop is up.

Webmin was just a last resort after failing to get this to load automatically after 15 hours or so of research and trial & error. The proxy and the website logging through sarg has been working from the start, I just want this to work without having to babysit the machine every time it starts. When I put this server online I won’t be present every time is starts and there won’t be anyone around who will be able to login as su and manually do it.

Look in the log for clues as to why it won’t start. You may need a ServerName directive. AFAICT squid binds to port 3128 on all addresses (including localhost) so if an interface comes up later, it will be listening on that interface.

The other reason is it may be looking for a DNS server on another machine, and hence not reachable, at startup. One workaround is to run a DNS proxy that is always available, like dnsmasq.

I can’t find an error log for squid, I have:

None of these has a reference to any errors, webmin has an error log that says PAM is not installed and that a perl module would need to be installed.

I installed Squid, Sarg and the Yast plugin through the Yast installer and did not see any reference to a perl dependency so I assumed this module was not needed for the functionality that I am seeking.

Would this DNS proxy you are referring to run on this local machine or would it be dependent on a client machine? If Squid binds to this DNS proxy would it know to switch to the wlan0 interface once it loads up or just find the wlan0 interface through the DNS proxy?

The logs are in /var/log/squid/ as already mentioned. There should be rcsquid.log, cache.log, store.log and access.log at the very least.

If you need to run dnsmasq, it would be on the same machine. Squid doesn’t need to switch, you would continue to let dnsmasq provide DNS resolution to squid.

I was looking in the /var folder as a user and the /log folder was not visible. I can see it as root, sorry about that.

Here is the error that repeats at every boot

2010/03/25 16:44:12| aclParseIpData: WARNING: Netmask masks away part of the specified IP in ‘’
2010/03/25 16:44:12| Failed to acquire SSL certificate ‘(null)’: error:0200100E:system library:fopen:Bad address

The network address and mask it is referencing is the LAN configuration for this network.

That acl error should be fixed eventually but the fatal error is the SSL cert. I’ve not seen this before but then I don’t use SSL with squid (not even sure off the top of my head what for). fopen indicates it’s a local file. Is there some certificate that’s not readable by the squid user? You may have saved it as root and only root processes can read it.

I don’t know, I set up squid and sarg from a user account but at every step I had to enter the root password so it is possible.
Is there a folder or files where this SSl might be that I can change permissions on?
Do you think this might be connected somehow to squid not starting correctly until the entire system is fully booted or just something that should be delt with?

I don’t know how the SSL is involved but if squid refuses to start without it, then you either should provide it or disable SSL. Not even sure where the SSL comes in.

As for the subnet specification, I suspect your network is actually The first part of the spec should be a network address, not a host address.