[KLUG Members] squid proxy log rotate error
Jason Edward Durrett
jed at shackman.com
Wed May 2 16:56:23 EDT 2007
>> I think that's it. "su -" tries to create an environment (path, shell,
>> etc) that the user would have if they logged in. User nobody can't log
>> in, so that could be the problem. See if it works taking out the first
>> dash.
>>
>
> I think you mean edit the squid.logrotate script so the line reads:
>
> su nobody -c "/usr/bin/killall -USR1 squid >/dev/null 2>&1"
>
> I tried that and ran it as root (instead of waiting for the cron job)
> and it still reported back:
>
> This account is currently not available.
>
>
How about editing the script so it is just:
/usr/bin/killall -USR1 squid >/dev/null 2>&1
On my system logs are rotated by the /etc/cron.daily/logrotate script.
The configuration for each of the logs is in /etc/logrotate.d/ - For
squid it is /etc/logrotate.d/squid and that file contains:
# Logrotate fragment for squid.
#
/var/log/squid/*.log {
daily
compress
delaycompress
rotate 2
missingok
nocreate
sharedscripts
prerotate
test ! -x /usr/sbin/sarg-maint || /usr/sbin/sarg-maint
endscript
postrotate
test ! -e /var/run/squid.pid || /usr/sbin/squid -k rotate
endscript
}
--
Jason Edward Durrett
B. Shackman Company
1-269-484-1000
fax: 1-269-484-1010
web: www.shackman.com
More information about the Members
mailing list