wok-stable rev 12213
up: logrotate(3.8.1) + improve package"
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sun Apr 01 12:41:48 2012 +0200 (2012-04-01) |
parents | 880772e418b7 |
children | 297bc4cc8984 |
files | logrotate/receipt |
line diff
1.1 --- a/logrotate/receipt Sat Mar 31 17:00:54 2012 +0200 1.2 +++ b/logrotate/receipt Sun Apr 01 12:41:48 2012 +0200 1.3 @@ -1,7 +1,7 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="logrotate" 1.7 -VERSION="3.7.9" 1.8 +VERSION="3.8.1" 1.9 CATEGORY="system-tools" 1.10 SHORT_DESC="Automatic rotation compression, removal of log files." 1.11 MAINTAINER="pascal.bellard@slitaz.org" 1.12 @@ -23,7 +23,26 @@ 1.13 genpkg_rules() 1.14 { 1.15 mkdir -p $fs/usr $fs/etc 1.16 - touch $fs/etc/logrotate.conf 1.17 + echo -e "#Logrotate Config file\n\ninclude /etc/logrotate.d" \ 1.18 + > $fs/etc/logrotate.conf 1.19 cp -a $_pkg/usr/sbin $fs/usr 1.20 } 1.21 1.22 +post_install() 1.23 +{ 1.24 + if [ -f $1/var/spool/cron/crontabs/root ]; then 1.25 + echo "Runing post install command..." 1.26 + echo -e "#Run log rotation\n25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf " \ 1.27 + >> $1/var/spool/cron/crontabs/root 1.28 + fi 1.29 +} 1.30 + 1.31 + 1.32 +post_remove() 1.33 +{ 1.34 + if [ -f /var/spool/cron/crontabs/root ]; then 1.35 + echo "Runing post install command..." 1.36 + sed -i s!.*logrotate.*!! /var/spool/cron/crontabs/root 1.37 + fi 1.38 +} 1.39 +