Skip to content

Instantly share code, notes, and snippets.

@ledongthuc
Created September 7, 2018 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ledongthuc/309a32666c5cfedd6ba20a45c0605ebe to your computer and use it in GitHub Desktop.
Save ledongthuc/309a32666c5cfedd6ba20a45c0605ebe 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