Skip to content

Instantly share code, notes, and snippets.

@patrickdavey
Last active March 24, 2021 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickdavey/cc0cc4738dd14b780ffa9c1b6ba7c6a8 to your computer and use it in GitHub Desktop.
Save patrickdavey/cc0cc4738dd14b780ffa9c1b6ba7c6a8 to your computer and use it in GitHub Desktop.
current apache2 logrotate
/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