Хочу ротейтить access.log squid, каждый месяц.
Store и cache каждый день.Не получается.
В /etc/cron.dailym - есть файл logrotate
#!/bin/sh
test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf
/etc/crontab
00 0 * * * root run-parts /etc/cron.daily
/etc/logrotate.d/squid
/var/log/squid/access.log {
monthly
compress
delaycompress
rotate 3
missingok
nocreate
sharedscripts
prerotate
test ! -x /usr/sbin/sarg-reports || /usr/sbin/sarg-reports monthly
endscript
postrotate
test ! -e /var/run/squid.pid || test ! -x /usr/sbin/squid || /usr/sbin/squid -k rotate
endscript
}
/var/log/squid/cache.log {
daily
nocompress
delaycompress
rotate 1
missingok
nocreate
sharedscripts
postrotate
test ! -e /var/run/squid.pid || test ! -x /usr/sbin/squid || /usr/sbin/squid -k rotate
endscript
}
/var/log/squid/store.log {
daily
rotate 1
compress
delaycompress
missingok
nocreate
sharedscripts
postrotate
test ! -e /var/run/squid.pid || test ! -x /usr/sbin/squid || /usr/sbin/squid -k rotate
endscript
}