Skip to content

Instantly share code, notes, and snippets.

@hoangtranwork
Forked from ledongthuc/centos_logrotate
Created March 7, 2019 08:06
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 hoangtranwork/4f915f90e336b2e5b56426c13d7153f4 to your computer and use it in GitHub Desktop.
Save hoangtranwork/4f915f90e336b2e5b56426c13d7153f4 to your computer and use it in GitHub Desktop.
sudo bash -c "cat <<EOT > /etc/logrotate.d/api
/opt/app/*.log {
missingok
notifempty
compress
size 10k
daily
copytruncate
compress
sharedscripts
rotate 1
maxage 1
create 0644 <username> <groupname>
}
/opt/app/jackrabbit.log_IS_UNDEFINED {
missingok
notifempty
compress
size 10k
daily
copytruncate
compress
sharedscripts
rotate 1
maxage 1
create 0644 <username> <groupname>
}
jetty.log_IS_UNDEFINED {
missingok
notifempty
compress
size 10k
daily
copytruncate
compress
sharedscripts
rotate 1
maxage 1
create 0644 <username> <groupname>
}
EOT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment