/usr/local/apache2/logs/*log { daily missingok ifempty sharedscripts postrotate /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true EXT=`date +%Y%m%d` for i in $1; do /bin/mv $i.1 $i.$EXT /bin/gzip $i.$EXT /bin/mv /usr/local/apache2/logs/*gz /usr/local/apache2/logs/old/. done EXT=`date +%Y%m%d --date '14 days ago'` /bin/rm -rf /usr/local/apache2/logs/old/*.${EXT}.gz >/dev/null 2>&1 endscript }
/etc/httpd/logs/*log { daily missingok ifempty sharedscripts postrotate /usr/local/apache2/bin/apachectl graceful 2> /dev/null endscript lastaction EXT=`date +%Y%m%d` for i in $1; do /bin/mv $i.1 $i.$EXT /bin/gzip $i.$EXT /bin/mv /etc/httpd/logs/*gz /etc/httpd/logs/old/. done EXT=`date +%Y%m%d --date '14 days ago'` /bin/rm -rf /etc/httpd/logs/old/*.${EXT}.gz >/dev/null 2>&1 endscript }