Ticket #2097: apache2_logrotate_fix.patch

File apache2_logrotate_fix.patch, 1.1 KB (added by aseques, 2 years ago)
  • configs/debian/logrotate/ispcp

     
     1#Log rotation for apache2 launches general statistics if awstats is installed 
     2/var/log/apache2/*.log { 
     3  weekly 
     4  missingok 
     5  rotate 8 
     6  compress 
     7  delaycompress 
     8  notifempty 
     9  create 640 root adm 
     10  sharedscripts 
     11  prerotate 
     12    if [ `cat /etc/ispcp/ispcp.conf | grep -c "AWSTATS_ACTIVE = yes"` == 1 ]; then 
     13          perl /var/www/ispcp/engine/awstats/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl &> /dev/null 
     14    fi 
     15  endscript 
     16  postrotate 
     17    if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then 
     18           /etc/init.d/apache2 reload > /dev/null 
     19    fi 
     20  endscript 
     21} 
     22 
    123/var/log/apache2/users/*.log { 
    224  weekly 
    325  missingok 
     
    1537  endscript 
    1638} 
    1739 
    18 /var/log/apache2/backup/*.log.perv { 
     40/var/log/apache2/backup/*.log.prev { 
    1941  size 5M 
    2042  missingok 
    2143  rotate 5