sorry, not to do the 20 question thing, but does this also deal with the domain logs (ie /var/www/virtual/{domain_name}/logs/ directory?) as these are the main ones that are causing me my headaches.
i do appreciate all your help with this.
here is what my /etc/logrotate.d/ispcp has currently:
Code:
/var/log/httpd/users/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
prerotate
/srv/www/ispcp/engine/traffic/ispcp-srv-traff &>/var/log/ispcp/ispcp-srv-traff.log
endscript
postrotate
for i in `seq 1 10`; do
if [ -f /var/run/httpd.pid ]; then
/etc/init.d/httpd stop > /dev/null
sleep 5
/etc/init.d/httpd start > /dev/null
fi
done
endscript
}
/var/log/xferlog {
daily
rotate 7
missingok
compress
delaycompress
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
/var/log/ftp_traff.log {
daily
rotate 7
missingok
compress
delaycompress
prerotate
/var/www/ispcp/engine/traffic/ispcp-vrl-traff &> /var/log/ispcp/ispcp-vrl-traff.log
endscript
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
ok, i think i have it figured out (assuming as asked above that this does what I was looking for):
Code:
/var/log/apache2/users/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
prerotate
/var/www/ispcp/engine/traffic/ispcp-vrl-traff >/var/log/ispcp/ispcp-vrl-traff.log 2>&1
endscript
postrotate
if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
/etc/init.d/apache2 reload > /dev/null
fi
endscript
}
# Rotation for user traffic prevs
#
/var/log/apache2/backup/*.log.prev {
size 5M
missingok
rotate 5
compress
delaycompress
notifempty
create 640 root adm
}
# Rotation for apache2, launching general statistics if awstats is installed
#
/var/log/apache2/*.log {
weekly
rotate 52
missingok
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
prerotate
if [ `cat /etc/ispcp/ispcp.conf | grep -c 'AWSTATS_ACTIVE *= *yes'` = 1 ]; then
perl /var/www/ispcp/engine/awstats/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl >/dev/null 2>&1
fi
endscript
postrotate
if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
/etc/init.d/apache2 reload > /dev/null
fi
endscript
}
# Rotation for ispcp-apache-logger logfiles
#
"/var/log/ispcp/ispcp-apache-logger.stderr" /var/log/ispcp/ispcp-apache-logger.stdout {
weekly
rotate 2
size 10M
missingok
compress
delaycompress
notifempty
create 640 root adm
}
/var/log/httpd/users/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
prerotate
/srv/www/ispcp/engine/traffic/ispcp-srv-traff &>/var/log/ispcp/ispcp-srv-traff.log
endscript
postrotate
for i in `seq 1 10`; do
if [ -f /var/run/httpd.pid ]; then
/etc/init.d/httpd stop > /dev/null
sleep 5
/etc/init.d/httpd start > /dev/null
fi
done
endscript
}
/var/log/xferlog {
daily
rotate 7
missingok
compress
delaycompress
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
/var/log/ftp_traff.log {
daily
rotate 7
missingok
compress
delaycompress
prerotate
/var/www/ispcp/engine/traffic/ispcp-vrl-traff &> /var/log/ispcp/ispcp-vrl-traff.log
endscript
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
/var/log/httpd/users/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
prerotate
/srv/www/ispcp/engine/traffic/ispcp-srv-traff &>/var/log/ispcp/ispcp-srv-traff.log
endscript
postrotate
for i in `seq 1 10`; do
if [ -f /var/run/httpd.pid ]; then
/etc/init.d/httpd stop > /dev/null
sleep 5
/etc/init.d/httpd start > /dev/null
fi
done
endscript
}
/var/log/xferlog {
daily
rotate 7
missingok
compress
delaycompress
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
/var/log/ftp_traff.log {
daily
rotate 7
missingok
compress
delaycompress
prerotate
/var/www/ispcp/engine/traffic/ispcp-vrl-traff &> /var/log/ispcp/ispcp-vrl-traff.log
endscript
postrotate
/usr/bin/killall -HUP syslogd
endscript
}