summaryrefslogtreecommitdiff
path: root/recipes-extended/logrotate/logrotate_%.bbappend
blob: c8adb80c257877cbe342b4ea4d7f7f68334162a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
PR .= ".mlinux2"

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI[md5sum] = "8572b7c2cf9ade09a8a8e10098500fb3"
SRC_URI[sha256sum] = "5bf8e478c428e7744fefa465118f8296e7e771c981fb6dffb7527856a0ea3617"


SRC_URI += "file://logrotate.conf"

# consider Systemd here someday.  Also prevent logrotate from starting if it is already running
# use startdaemon?
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}/
}