Added list_intervals.sh to show available intervals.
This commit is contained in:
parent
22465abdb5
commit
165a7a93a5
1 changed files with 21 additions and 0 deletions
21
tools/list_intervals.sh
Executable file
21
tools/list_intervals.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/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
|
Loading…
Reference in a new issue