Search squid archive

squid not starting on reboot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been having trouble with my server rebooting lately, and trying
to get to the bottom of that issue.

But what I'm noticing a lot is that squid is not starting
automatically on the reboot.  The system is Ubuntu Lucid, not
compiled from source.  Default runlevel is 2, and squid starting
script is both in /etc/init.d and sym linked in /etc/rc2.d/S20squid

Anyone think of a reason why it won't start?  In my very primitive
bash knowledge, I wrote a script into /etc/rc.local that I thought
would test if it's running, wait and loop until it does start.  But
even that's not working and the mails aren't getting sent.  Doubt
this problem is related, could be an error in the script but when I
test it manually it seems to work as intended.

  #!/bin/sh -e
  
  ps ax | grep squid | grep -v grep
  while [ $? -ne 0 ]; do
    mail -s "squid not started" root < /dev/null
    service squid start
    sleep 60
    ps ax | grep squid | grep -v grep
  done

Any ideas?

-- 
Troy Piggins


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux