2006-06-24 11:17:20 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2007-08-16 21:39:18 +00:00
|
|
|
# Nico Schottelius <nico-ccollect //@// schottelius.org>
|
2006-06-24 11:17:20 +00:00
|
|
|
# Date: 24-Jun-2006
|
|
|
|
# Last Modified: -
|
2007-08-17 08:48:04 +00:00
|
|
|
# Copying: GPLv3 (See file COPYING in top directory)
|
2006-06-24 11:17:20 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
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
|
2006-06-24 11:17:20 +00:00
|
|
|
fi
|
|
|
|
|
2007-08-16 21:39:18 +00:00
|
|
|
set -e
|
|
|
|
cd "${CCOLLECT_INTERVALS}"
|
2006-06-24 11:17:20 +00:00
|
|
|
|
|
|
|
for interval in *; do
|
2007-08-16 21:39:18 +00:00
|
|
|
eval int_${interval}=$(cat "${interval}");
|
|
|
|
eval echo ${interval}: \$int_${interval};
|
2006-06-24 11:17:20 +00:00
|
|
|
done
|