1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Whitespace cleanup

* remove trailing whitespace
* remove empty lines at the end of files
This commit is contained in:
Lars Kruse 2018-08-02 02:03:42 +02:00
parent ef851f0c34
commit 17f784270a
604 changed files with 2927 additions and 2945 deletions

View file

@ -8,23 +8,23 @@ case $1 in
COUNTER=1
while [ $COUNTER -gt 0 ]; do
FILE_PATH="file${COUNTER}_path"
# Is the path for this file specified?
eval FILE=\$$FILE_PATH
if [ "$FILE" == "" ]; then
break;
fi
# It is! Add it to the graphs.
GRAPH_ORDER="$GRAPH_ORDER file_$COUNTER"
# Does this file have a specified label?
LABEL_COUNTER="file${COUNTER}_label"
eval LABEL=\$$LABEL_COUNTER
if [ "$LABEL" == "" ]; then
LABEL=`basename $FILE`
fi
# Associated warning level?
WARNING="file${COUNTER}_warning"
eval WARNING=\$$WARNING
@ -44,7 +44,7 @@ case $1 in
echo "file_$COUNTER.min 0"
let COUNTER=COUNTER+1
done;
echo "graph_order $GRAPH_ORDER"
echo "graph_title File age"
echo 'graph_args --base 1000 -l 0'
@ -63,14 +63,14 @@ while [ $COUNTER -gt 0 ]; do
if [ "$FILE" == "" ]; then
break;
fi
# If the file isn't readable, say it's zero.
# If the file isn't readable, say it's zero.
if [ ! -r "$FILE" ]; then
VALUE=0
else
VALUE=$(($(date +%s) - $(stat -c '%Y' "$FILE")))
fi
echo "file_$COUNTER.value $VALUE"
let COUNTER=COUNTER+1
done;