www.nico.schottelius.org/software/ccollect/ccollect-0.5.1/tools/list_intervals.sh
Nico Schottelius 7a4e82d87a raw import of ccollect from unix.schottelius.org
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
2009-05-26 23:45:19 +02:00

21 lines
453 B
Bash

#!/bin/sh
#
# Nico Schottelius <nico-linux //@// schottelius.org>
# Date: 24-Jun-2006
# Last Modified: -
#
CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect}
CCOLLECT_INTERVALS="$CCOLLECT_CONF/defaults/intervals"
if [ ! -d "$CCOLLECT_INTERVALS" ]; then
echo "No intervals defined in $CCOLLECT_INTERVALS"
exit 23
fi
cd "$CCOLLECT_INTERVALS"
for interval in *; do
eval int_$interval=$(cat $interval);
eval echo $interval: \$int_$interval;
done