Skip to content

Instantly share code, notes, and snippets.

@hfm
Last active December 17, 2015 00:49
Show Gist options
  • Select an option

  • Save hfm/5523440 to your computer and use it in GitHub Desktop.

Select an option

Save hfm/5523440 to your computer and use it in GitHub Desktop.
logrotate setting
weekly
rotate 4
start 1
dateext
dateformat -%Y-%m-%d
missingok
create
compress
include /usr/local/etc/logrotate.d
mail ****@****.****
maillast
/var/log/clamav/clamd.log {
size 5k
postrotate
test -r /var/run/clamav/clamd.pid && kill -USR1 `cat /var/run/clamav/clamd.pid`
endscript
}
/var/log/clamav/freshclam.log {
size 5k
postrotate
test -r /var/run/clamav/freshclam.pid && kill -USR1 `cat /var/run/clamav/freshclam.pid`
endscript
}
/var/log/nginx/access.log /var/log/nginx/errer.log /var/log/nginx/wp.access.log /var/log/nginx/wp.error.log {
size 1M
sharedscripts
postrotate
test -r /var/run/nginx.pid && kill -USR1 `cat /var/run/nginx.pid`
endscript
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment