ccollect/tools/list_ccollect_intervals.sh

31 lines
584 B
Bash
Raw Normal View History

#!/bin/sh
#
2007-08-16 21:39:18 +00:00
# Nico Schottelius <nico-ccollect //@// schottelius.org>
# Date: 24-Jun-2006
# Last Modified: -
2007-08-17 08:48:04 +00:00
# Copying: GPLv3 (See file COPYING in top directory)
#
CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect}
CCOLLECT_INTERVALS="$CCOLLECT_CONF/defaults/intervals"
2007-08-16 21:39:18 +00:00
me="$(basename $0)"
_echo()
{
echo "$me> $@"
}
if [ ! -d "${CCOLLECT_INTERVALS}" ]; then
_echo "No intervals defined in ${CCOLLECT_INTERVALS}"
exit 1
fi
2007-08-16 21:39:18 +00:00
set -e
cd "${CCOLLECT_INTERVALS}"
for interval in *; do
2007-08-16 21:39:18 +00:00
eval int_${interval}=$(cat "${interval}");
eval echo ${interval}: \$int_${interval};
done