2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

more content-oriented name

This commit is contained in:
Ander Punnar 2017-04-14 17:31:49 +03:00
parent 81baaf6976
commit 390c805027

View File

@ -66,7 +66,7 @@ GPLv2
#set -xv #set -xv
MAIL_LOG="${logfiles:-/var/log/mail.log /var/log/mail.log.1}" MAIL_LOG="${logfiles:-/var/log/mail.log /var/log/mail.log.1}"
GREP_HOSTNAME=$(basename "$0" | sed -r 's/postfix_stats_?//') FILTER_HOSTNAME=$(basename "$0" | sed -r 's/postfix_stats_?//')
# shellcheck disable=SC2154 # shellcheck disable=SC2154
PFLOGSUMM="${pflogsum}" PFLOGSUMM="${pflogsum}"
@ -93,8 +93,8 @@ fi
# Config Section # Config Section
# #
if [ "$1" = 'config' ]; then if [ "$1" = 'config' ]; then
if [ -n "${GREP_HOSTNAME}" ]; then if [ -n "${FILTER_HOSTNAME}" ]; then
echo "graph_title Postfix statistics for ${GREP_HOSTNAME}" echo "graph_title Postfix statistics for ${FILTER_HOSTNAME}"
else else
echo 'graph_title Postfix statistics' echo 'graph_title Postfix statistics'
fi fi
@ -121,8 +121,8 @@ fi
# Variable to store the pflogsumm result. # Variable to store the pflogsumm result.
# shellcheck disable=SC2086 # shellcheck disable=SC2086
if [ -n "${GREP_HOSTNAME}" ]; then if [ -n "${FILTER_HOSTNAME}" ]; then
TMP_RAW=$(grep -h " ${GREP_HOSTNAME} postfix/" ${MAIL_LOG} | "${PFLOGSUMM}" -d today --detail 0 --zero-fill) TMP_RAW=$(grep -h " ${FILTER_HOSTNAME} postfix/" ${MAIL_LOG} | "${PFLOGSUMM}" -d today --detail 0 --zero-fill)
else else
TMP_RAW=$("${PFLOGSUMM}" -d today --detail 0 --zero-fill ${MAIL_LOG}) TMP_RAW=$("${PFLOGSUMM}" -d today --detail 0 --zero-fill ${MAIL_LOG})
fi fi