Hello, --- Christopher Dawkins <cchd@felsted.essex.sch.uk> wrote: >
Can anyone see anything wrong with this as a crontab?
File: /var/spool/cron/tabs/root -=============================- 54 23 * * 0-4 squid -k kill 59 23 * * 0-4 /etc/dansguardian/dorename 5 0 * * 1-5 squid -k rotate -=============================-
In crontab, I don't think squid kills or rotates at all, but manually it works perfectly... Any ideas?
Hmmm, in short -- no! My suggestion is to make sure that "squid" is in your $PATH, especially for user "nobody" which Cron should use when processing the crontab file. In all likelyhood the result will be true...... On SuSE systems, in "/etc/init.d/" are the start-up scripts for each service, including one for squid. I would suggest that you replace: squid -k rotate, in place of /etc/init.d/squid rotate (in each case...) Try adding the full path as a prefix to the squid binary, i.e. /usr/sbin/squid -k rotate see if that makes a difference....
I use
5 0 * * * /bin/kill -USR1 `cat /var/run/squid.pid`
to rotate the Squid files, but I don't know about DansGuardian
Christopher, your crontab entry above to rotate the squid files, although clever, is OTT. The squid daemon has this functionality already built into it, via the "-k rotate" flag option. DansGuardian rotates its log files by itself, by calling a shell-script which can be appended to a crontab file. HTH, Let me know if it works, -- Thomas Adam ===== Thomas Adam "The Linux Weekend Mechanic" -- www.linuxgazette.com __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com