slitaz-modular rev 148
local-mirror: Copy /usr/bin/makegraphs to $MAIN_WWW_DIR/pics/makegraphs so home boot option will make disk and network graphs pics.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Nov 17 12:14:56 2011 +0000 (2011-11-17) |
parents | 5f1950d053b2 |
children | 2b0af457e3da |
files | initramfs/usr/bin/local-mirror |
line diff
1.1 --- a/initramfs/usr/bin/local-mirror Wed Nov 16 16:17:22 2011 +0000 1.2 +++ b/initramfs/usr/bin/local-mirror Thu Nov 17 12:14:56 2011 +0000 1.3 @@ -229,9 +229,10 @@ 1.4 [ -d $MAIN_WWW_DIR/mirror-info/pics ] || mkdir -p $MAIN_WWW_DIR/mirror-info/pics 1.5 [ -d $MAIN_WWW_DIR/mirror-info/pics/rrd ] || ln -sf $MAIN_WWW_DIR/pics/rrd $MAIN_WWW_DIR/mirror-info/pics/rrd 1.6 if [ -f /usr/bin/makegraphs ]; then 1.7 - if [ ! $(grep -l "/usr/bin/makegraphs" $CRON_FILE) ]; then 1.8 + [ -f $MAIN_WWW_DIR/pics/makegraphs ] || cp -a /usr/bin/makegraphs $MAIN_WWW_DIR/pics/makegraphs 1.9 + if [ ! $(grep -l "$MAIN_WWW_DIR/pics/makegraphs" $CRON_FILE) ]; then 1.10 echo "# Update system load graphics" >> $CRON_FILE 1.11 - echo "*/5 * * * * /usr/bin/makegraphs" >> $CRON_FILE 1.12 + echo "*/5 * * * * $MAIN_WWW_DIR/pics/makegraphs" >> $CRON_FILE 1.13 fi 1.14 fi 1.15 ;; 1.16 @@ -258,9 +259,10 @@ 1.17 fi 1.18 fi 1.19 if [ -f /usr/bin/makegraphs ]; then 1.20 - if [ ! $(grep -l "/usr/bin/makegraphs" $CRON_FILE) ]; then 1.21 + [ -f $MAIN_WWW_DIR/pics/makegraphs ] || cp -a /usr/bin/makegraphs $MAIN_WWW_DIR/pics/makegraphs 1.22 + if [ ! $(grep -l "$MAIN_WWW_DIR/pics/makegraphs" $CRON_FILE) ]; then 1.23 echo "# Update system load graphics" >> $CRON_FILE 1.24 - echo "*/5 * * * * /usr/bin/makegraphs" >> $CRON_FILE 1.25 + echo "*/5 * * * * $MAIN_WWW_DIR/pics/makegraphs" >> $CRON_FILE 1.26 fi 1.27 fi 1.28 ;;