Last active
August 29, 2015 14:03
-
-
Save westonplatter/295319737c03ad7130f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.logrotate,v 1.3 2008/10/15 20:46:12 mr_bones_ Exp $ | |
| # | |
| # Syslog-ng logrotate snippet for Gentoo Linux | |
| # contributed by Michael Sterrett | |
| # | |
| /var/log/auth.log { | |
| su root root | |
| missingok | |
| sharedscripts | |
| postrotate | |
| echo "== postrotate start" | |
| echo "-- restart rsyslog" | |
| service rsyslog restart | |
| echo "-- s3 upload" | |
| BUCKET=my-logs-bucket | |
| INSTANCE_ID=my-machine-id | |
| /usr/local/bin/s3cmd -m text/plain sync /var/log/auth.log.* s3://${BUCKET}/${INSTANCE_ID}/auth.log | |
| echo "== postrotate end" | |
| endscript | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment