bug-logrotate: Add logrotate config file for bug
authorStefan Schmidt <stefan@buglabs.net>
Thu, 11 Nov 2010 14:00:36 +0000 (15:00 +0100)
committerStefan Schmidt <stefan@buglabs.net>
Thu, 16 Dec 2010 14:03:09 +0000 (15:03 +0100)
recipes/bug-logrotate/bug-logrotate_0.1.bb [new file with mode: 0644]
recipes/bug-logrotate/files/bug-rules [new file with mode: 0644]

diff --git a/recipes/bug-logrotate/bug-logrotate_0.1.bb b/recipes/bug-logrotate/bug-logrotate_0.1.bb
new file mode 100644 (file)
index 0000000..f9e77af
--- /dev/null
@@ -0,0 +1,13 @@
+DESCRIPTION = "Logrotate rules for BUG"
+RDEPENDS_${PN} = "logrotate"
+
+SRC_URI = "file://bug-rules"
+
+S = "${WORKDIR}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_install() {
+    install -d ${D}/etc/logrotate.d
+    install -m 0644 bug-rules ${D}/etc/logrotate.d/
+}
diff --git a/recipes/bug-logrotate/files/bug-rules b/recipes/bug-logrotate/files/bug-rules
new file mode 100644 (file)
index 0000000..e8ae5af
--- /dev/null
@@ -0,0 +1,44 @@
+/var/log/felix.log
+{
+        rotate 7
+        daily
+       size 1M
+       missingok
+        notifempty
+        compress
+        postrotate
+               /etc/init.d/felix restart
+        endscript
+}
+
+/var/log/kern.log
+/var/log/debug
+/var/log/syslog
+{
+        rotate 7
+        daily
+       size 1M
+       missingok
+        notifempty
+        compress
+        postrotate
+               /etc/init.d/syslog-ng restart
+        endscript
+}
+
+/var/log/daemon.log
+/var/log/auth.log
+/var/log/user.log
+/var/log/cron.log
+/var/log/messages
+{
+        rotate 4
+        weekly
+        missingok
+        notifempty
+        compress
+        sharedscripts
+        postrotate
+               /etc/init.d/cron restart
+        endscript
+}