1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-24 18:07:20 +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

@ -1,5 +1,5 @@
#!/bin/sh
#
#
# Plugin to monitor the amavis mail filter for Debian
# (based upon a plugin authored by Geoffroy Desvernay)
#
@ -32,7 +32,7 @@ BC=${bc:-`which bc`}
mktempfile () {
mktemp
}
}
if [ "$1" = "autoconf" ]; then
if [ -f "${AMAVIS_LOG}" -a -n "${LOGTAIL}" -a -x "${LOGTAIL}" -a -n "${BC}" -a -x "${BC}" ] ; then
@ -96,7 +96,7 @@ then
virus=`grep 'INFECTED' ${TEMP_FILE} | wc -l`
spam=`grep 'Blocked SPAM' ${TEMP_FILE} | wc -l`
other=`echo ${total}-${clean}-${virus}-${other}-${spam} | ${BC}`
/bin/rm -f $TEMP_FILE
fi

View file

@ -2,7 +2,7 @@
#
# Plugin to monitor Amavis virus and spam statistics.
#
#
#
# Based on a routine by William Towle
# Uncomment the cdef lines to convert the graph to mails/minute
# Comment out the line "total.graph no" to show the total on the graph. This may not be aesthetically pleasing.
@ -38,7 +38,7 @@ if [ "$1" = "config" ]; then
echo 'graph_args --base 1000 -l 0'
echo 'graph_order clean p_spam b_spam virus total'
echo 'clean.min 0'
echo 'clean.type ABSOLUTE'
#echo 'clean.cdef clean,60,*'
@ -70,12 +70,12 @@ fi
$LOGTAIL ${MAIL_LOG} $STATEFILE | \
awk 'BEGIN { na= 0; nb= 0; nc= 0; nd= 0; total= 0 }
awk 'BEGIN { na= 0; nb= 0; nc= 0; nd= 0; total= 0 }
{
if (index($0, "Passed CLEAN")) { na++ ; total++ }
else if (index($0, "Passed SPAMMY")) { nb++ ; total++ }
{
if (index($0, "Passed CLEAN")) { na++ ; total++ }
else if (index($0, "Passed SPAMMY")) { nb++ ; total++ }
else if (index($0, "Blocked SPAMMY")) { nc++ ; total++ }
else if (index($0, "INFECTED")) { nd++ ; total++ }
}