From 782097d72b409ada1d2420a8e5ce31025e106794 Mon Sep 17 00:00:00 2001 From: Ander Punnar Date: Thu, 13 Apr 2017 13:04:45 +0300 Subject: [PATCH] be more clever --- plugins/postfix/postfix_stats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/postfix/postfix_stats b/plugins/postfix/postfix_stats index 251d539d..44b737d4 100755 --- a/plugins/postfix/postfix_stats +++ b/plugins/postfix/postfix_stats @@ -62,7 +62,7 @@ GPLv2 #set -xv MAIL_LOG="${logfiles:-/var/log/mail.log /var/log/mail.log.1}" -GREP_HOSTNAME="${0##*postfix_stats_}" +GREP_HOSTNAME=$(echo $0 | sed -r 's/^.+postfix_stats_?//') # shellcheck disable=SC2154 PFLOGSUMM="${pflogsum}"