cookutils rev 760

cooker: crontab for the poke button
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Sep 27 23:24:30 2015 +0200 (2015-09-27)
parents 1778d08e5b0d
children c3ed293b72d9
files cooker
line diff
     1.1 --- a/cooker	Sun Sep 27 23:02:37 2015 +0200
     1.2 +++ b/cooker	Sun Sep 27 23:24:30 2015 +0200
     1.3 @@ -293,8 +293,12 @@
     1.4  			mkdir -p /var/spool/cron/crontabs
     1.5  		fi
     1.6  		if ! fgrep -q /usr/bin/cooker $crontabs; then
     1.7 -			echo "# Run SliTaz Cooker every $hours hours" > $crontabs
     1.8 -			echo "0 */$hours * * *  /usr/bin/cooker --output=html" >> $crontabs
     1.9 +			cat > $crontabs << EOT
    1.10 +# Run SliTaz Cooker every $hours hours
    1.11 +0 */$hours * * *  /usr/bin/cooker --output=html
    1.12 +*/5 * * * *  [ $CACHE/cooker-request -nt $CACHE/activity ] && /usr/bin/cooker --output=html
    1.13 +EOT
    1.14 +			touch $CACHE/cooker-request
    1.15  			killall crond 2>/dev/null && /etc/init.d/crond start
    1.16  		fi ;;
    1.17