Last active
March 24, 2021 20:57
-
-
Save patrickdavey/cc0cc4738dd14b780ffa9c1b6ba7c6a8 to your computer and use it in GitHub Desktop.
current apache2 logrotate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/var/log/apache2/*.log { | |
daily | |
missingok | |
rotate 14 | |
compress | |
delaycompress | |
notifempty | |
create 640 root adm | |
sharedscripts | |
postrotate | |
if invoke-rc.d apache2 status > /dev/null 2>&1; then \ | |
invoke-rc.d apache2 reload > /dev/null 2>&1; \ | |
fi; | |
endscript | |
prerotate | |
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ | |
run-parts /etc/logrotate.d/httpd-prerotate; \ | |
fi; \ | |
endscript | |
} | |
/srv/www/hachiko/shared/log/*.log { | |
daily | |
missingok | |
compress | |
delaycompress | |
sharedscripts | |
postrotate | |
touch /srv/www/hachiko/current/tmp/restart.txt | |
endscript | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment