slitaz-modular rev 108

local-mirror: Fixed website crond option. Check if bb.slitaz.org is used to add cook.slitaz.org to same line in /etc/hosts file.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed May 18 15:46:45 2011 +0000 (2011-05-18)
parents 39ff1035b446
children 649e9b448468
files initramfs/usr/bin/local-mirror
line diff
     1.1 --- a/initramfs/usr/bin/local-mirror	Tue May 17 20:23:45 2011 +0000
     1.2 +++ b/initramfs/usr/bin/local-mirror	Wed May 18 15:46:45 2011 +0000
     1.3 @@ -77,12 +77,10 @@
     1.4  	case "$b" in
     1.5  		website)
     1.6  			[ -d $REPOS_DIR/$b ] && ln -s $REPOS_DIR/$b $MAIN_WWW_DIR
     1.7 -			if [ -f $MAIN_WWW_DIR/$b/libs/get-latest.sh ]; then
     1.8 -					# run it here on first run
     1.9 -					$MAIN_WWW_DIR/$b/libs/get-latest.sh
    1.10 -				if [ ! $(grep -l "$MAIN_WWW_DIR/$b/libs/get-latest.sh" $CRON_FILE) ]; then
    1.11 +			if [ -f $MAIN_WWW_DIR/$b/libs/get-feeds.sh ]; then
    1.12 +				if [ ! $(grep -l "$MAIN_WWW_DIR/$b/libs/get-feeds.sh" $CRON_FILE) ]; then
    1.13  					echo "#Update SliTaz stuff" >> $CRON_FILE
    1.14 -					echo "*/20 * * * * $MAIN_WWW_DIR/$b/libs/get-latest.sh" >> $CRON_FILE
    1.15 +					echo "*/20 * * * * $MAIN_WWW_DIR/$b/libs/get-feeds.sh" >> $CRON_FILE
    1.16  				fi
    1.17  			fi
    1.18  		;;
    1.19 @@ -321,6 +319,8 @@
    1.20  		for hostname in $ADDRESS; do 
    1.21  				if [ "$hostname" = "www.slitaz.org" ]; then
    1.22  					echo "$IP_ADDR $hostname slitaz.org" >> /etc/hosts
    1.23 +				elif [ "$hostname" = "bb.slitaz.org" ]; then
    1.24 +					echo "$IP_ADDR $hostname cook.slitaz.org" >> /etc/hosts
    1.25  				else
    1.26  					echo "$IP_ADDR $hostname" >> /etc/hosts
    1.27  				fi