wok-stable diff logrotate/receipt @ rev 12465

Up e2fsprogs (1.44.2)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 04 18:42:23 2019 +0100 (2019-03-04)
parents 73b5177e96e3
children
line diff
     1.1 --- a/logrotate/receipt	Sun Jul 11 10:26:04 2010 +0200
     1.2 +++ b/logrotate/receipt	Mon Mar 04 18:42:23 2019 +0100
     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 +