diff options
Diffstat (limited to 'recipes/logrotate-script/logrotate-script_cvs.bb')
-rw-r--r-- | recipes/logrotate-script/logrotate-script_cvs.bb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/recipes/logrotate-script/logrotate-script_cvs.bb b/recipes/logrotate-script/logrotate-script_cvs.bb new file mode 100644 index 0000000000..a46b265e2f --- /dev/null +++ b/recipes/logrotate-script/logrotate-script_cvs.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "simple logrotate bash script" +RDEPENDS = "busybox" +SECTION = "admin" +PRIORITY = "optional" +LICENSE = "GPL" + +SRC_URI = "http://meshcube.org/download/logrotate_${SRCDATE}.tgz" +S = "${WORKDIR}/${PN}" + +do_install() { + (cd ${S}; tar -c --exclude .svn -f - . ) | tar -C ${D} -xpf - +} + +pkg_postinst() { +#!/bin/sh -e +ROOTCRON=/etc/cron/crontabs/root + +test -e /etc/cron/crontabs/root \ + && grep '^[^#].*logrotate' $ROOTCRON > /dev/null \ + || echo "*/5 * * * * /bin/bash ${sbindir}/logrotate -m 0600 -o root -g root -s 800 -l 3 /tmp/messages" >> $ROOTCRON + +/etc/init.d/cron restart + +exit 0 +} |