From 390c8050276d87a33a91500c6992b2d293b1a33b Mon Sep 17 00:00:00 2001 From: Ander Punnar Date: Fri, 14 Apr 2017 17:31:49 +0300 Subject: [PATCH] more content-oriented name --- plugins/postfix/postfix_stats | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/postfix/postfix_stats b/plugins/postfix/postfix_stats index b5509f4e..12da3c9a 100755 --- a/plugins/postfix/postfix_stats +++ b/plugins/postfix/postfix_stats @@ -66,7 +66,7 @@ GPLv2 #set -xv 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 PFLOGSUMM="${pflogsum}" @@ -93,8 +93,8 @@ fi # Config Section # if [ "$1" = 'config' ]; then - if [ -n "${GREP_HOSTNAME}" ]; then - echo "graph_title Postfix statistics for ${GREP_HOSTNAME}" + if [ -n "${FILTER_HOSTNAME}" ]; then + echo "graph_title Postfix statistics for ${FILTER_HOSTNAME}" else echo 'graph_title Postfix statistics' fi @@ -121,8 +121,8 @@ fi # Variable to store the pflogsumm result. # shellcheck disable=SC2086 -if [ -n "${GREP_HOSTNAME}" ]; then - TMP_RAW=$(grep -h " ${GREP_HOSTNAME} postfix/" ${MAIL_LOG} | "${PFLOGSUMM}" -d today --detail 0 --zero-fill) +if [ -n "${FILTER_HOSTNAME}" ]; then + TMP_RAW=$(grep -h " ${FILTER_HOSTNAME} postfix/" ${MAIL_LOG} | "${PFLOGSUMM}" -d today --detail 0 --zero-fill) else TMP_RAW=$("${PFLOGSUMM}" -d today --detail 0 --zero-fill ${MAIL_LOG}) fi