]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - tools/mkflash/logrotate.conf
git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848...
[people/pmueller/ipfire-2.x.git] / tools / mkflash / logrotate.conf
diff --git a/tools/mkflash/logrotate.conf b/tools/mkflash/logrotate.conf
new file mode 100644 (file)
index 0000000..f136a66
--- /dev/null
@@ -0,0 +1,84 @@
+# rotate log files weekly
+weekly
+
+# keep 2 weeks worth of backlogs
+rotate 2
+
+# create new (empty) log files after rotating old ones
+create
+
+# Maximum logfile size of 1MB
+size 1M
+
+# uncomment this if you want your log files compressed
+compress
+
+# wtmp
+/var/log/wtmp {
+    weekly
+    create 0664 root utmp
+    rotate 1
+}
+
+/var/log/httpd/access_log /var/log/httpd/error_log /var/log/httpd/ssl_request_log /var/log/httpd/ssl_engine_log {
+    missingok
+    sharedscripts
+    postrotate
+       /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
+    endscript
+}
+
+/var/log/snort/alert {
+    weekly
+    copytruncate
+    ifempty
+    missingok
+}
+
+/var/log/snort/scan.log  {
+    weekly
+    copytruncate
+    compress
+    ifempty
+    missingok
+    postrotate
+       /usr/bin/find /var/log/snort -path '/var/log/snort/[0-9]*' -prune -exec rm -rf {} \;
+       /usr/local/bin/restartsnort
+    endscript
+}
+
+/var/log/squid/access.log {
+    weekly
+    copytruncate
+    ifempty
+    missingok
+}
+
+/var/log/squid/cache.log {
+    weekly
+    rotate 3
+    copytruncate
+    compress
+    missingok
+}
+
+/var/log/squid/store.log {
+    weekly
+    rotate 3
+    copytruncate
+    compress
+    missingok
+    postrotate
+       /bin/chmod -R ugo+rX /var/log/squid
+       /usr/sbin/squid -k rotate
+    endscript
+}
+
+/var/log/messages /var/log/boot.log {
+    sharedscripts
+    ifempty
+    postrotate
+       /bin/chmod ugo+rX /var/log/messages
+       /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
+    endscript
+}