summaryrefslogtreecommitdiff
path: root/recipes-extended/logrotate/logrotate_%.bbappend
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/logrotate/logrotate_%.bbappend')
-rw-r--r--recipes-extended/logrotate/logrotate_%.bbappend15
1 files changed, 15 insertions, 0 deletions
diff --git a/recipes-extended/logrotate/logrotate_%.bbappend b/recipes-extended/logrotate/logrotate_%.bbappend
new file mode 100644
index 0000000..efebecb
--- /dev/null
+++ b/recipes-extended/logrotate/logrotate_%.bbappend
@@ -0,0 +1,15 @@
+PR .= ".mlinux2"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}"
+
+SRC_URI += "file://logrotate.conf"
+
+do_install_append() {
+ # setup cron to run logrotate more often
+ rm -f ${D}${sysconfdir}/cron.daily/logrotate
+ install -d ${D}${sysconfdir}/cron.d
+ echo "*/5 * * * * root /usr/sbin/logrotate /etc/logrotate.conf" > ${D}${sysconfdir}/cron.d/logrotate
+
+ install -m 0644 ${WORKDIR}/logrotate.conf ${D}${sysconfdir}/
+}
+