ccollect/tools/list_ccollect_intervals.sh
Nico Schottelius 52095b7cf0 Update e-mail
2007-08-16 23:39:18 +02:00

29 lines
531 B
Bash
Executable file

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