wok-current diff webalizer/receipt @ rev 1978
webalizer: update /etc/init.d/local.sh
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jan 04 09:43:17 2009 +0000 (2009-01-04) |
parents | 8ab0243e5a22 |
children | 27d5edd4588a |
line diff
1.1 --- a/webalizer/receipt Thu Dec 11 21:13:04 2008 +0000 1.2 +++ b/webalizer/receipt Sun Jan 04 09:43:17 2009 +0000 1.3 @@ -24,20 +24,29 @@ 1.4 # Rules to gen a SliTaz package suitable for Tazpkg. 1.5 genpkg_rules() 1.6 { 1.7 - mkdir -p $fs/usr $fs/etc $fs/var/www/webalizer 1.8 + mkdir -p $fs/usr $fs/etc $fs/var/www/webalizer $fs/etc/initcron.d 1.9 chown 80 $fs/var/www/webalizer 1.10 cp -a $_pkg/etc/webalizer.conf.sample $fs/etc/webalizer.conf 1.11 cp -a $_pkg/usr/bin $fs/usr 1.12 + cat > $fs/etc/initcron.d/webalizer << EOT 1.13 + 1.14 +30 0 * * * /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log 1.15 +EOT 1.16 + chmod +x $fs/etc/initcron.d/webalizer 1.17 } 1.18 1.19 # Pre and post install commands for Tazpkg. 1.20 post_install() 1.21 { 1.22 + grep -q webalizer $1/etc/init.d/local.sh || \ 1.23 + cat >> $1/etc/init.d/local.sh <<EOT 1.24 +/usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log 1.25 +EOT 1.26 if [ -z "$1" ]; then 1.27 webalizer -o /var/www/webalizer /var/log/apache/access_log 1.28 crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT 1.29 $(crontab -l 2> /dev/null) 1.30 -30 0 * * * /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log 1.31 +$(cat /etc/initcron.d/webalizer) 1.32 EOT 1.33 fi 1.34 }