db_5.0.21: Add recipes for target and native packages.
[openembedded.git] / recipes / logrotate-script / logrotate-script_cvs.bb
blob89f7108cba9f94904bf739970a63ab6f95289585
1 DESCRIPTION = "simple logrotate bash script"
2 RDEPENDS_${PN} = "busybox"
3 SECTION = "admin"
4 PRIORITY = "optional"
5 LICENSE = "GPL"
7 SRC_URI = "http://download.berlin.freifunk.net/meshcube.org/nylon/stable/sources/logrotate_${SRCDATE}.tgz"
8 S = "${WORKDIR}/${PN}"
10 do_install() {
11 (cd ${S}; tar -c --exclude .svn -f - . ) | tar -C ${D} -xpf -
14 pkg_postinst() {
15 #!/bin/sh -e
16 ROOTCRON=/etc/cron/crontabs/root
18 test -e /etc/cron/crontabs/root \
19 && grep '^[^#].*logrotate' $ROOTCRON > /dev/null \
20 || echo "*/5 * * * * /bin/bash ${sbindir}/logrotate -m 0600 -o root -g root -s 800 -l 3 /tmp/messages" >> $ROOTCRON
22 /etc/init.d/cron restart
24 exit 0