#!/bin/sh


function forall(){
		for i in /etc/rrd-scripts/*
		do
		    #echo $i
		    #$i $1 > /dev/null 2>&1
		    $i $1 
		done

}

case "$1" in
	init)	
		echo "creating initial rrd bases to store information"	
		forall init
		;;
	update)
    		forall update
		;;
	remove)
		echo "remove bases"
		forall remove
		;;
	day)
		forall day
		;;
	descr)
		forall descr
		;;
				
        *)
                echo "Usage: $0 {init|update|remove|day|descr}"
                exit 1
                ;;

esac

