Skip to content

Instantly share code, notes, and snippets.

@pgaref
Created May 6, 2016 09:50
Show Gist options
  • Save pgaref/8cd6a69060e786a09dc2d1d4af06185f to your computer and use it in GitHub Desktop.
Save pgaref/8cd6a69060e786a09dc2d1d4af06185f to your computer and use it in GitHub Desktop.
Daily logrotate for a supervisor job
# Path is: /etc/logrotate.d/my_job
/var/log/supervisor/my_job.log{
daily
missingok
rotate 1
compress
delaycompress
notifempty
create 0755 datateam adm
postrotate
/usr/bin/supervisorctl restart golang:my_job
endscript
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment