Projet

Général

Profil

Révision daf5b94a

IDdaf5b94a07cf6043417e00f04d3ff3715a8e9cdb
Parent d1d668f6
Enfant 156f0d84

Ajouté par Cristian Deluxe il y a environ 9 ans

Sellcheck disables and “eval” removed

Voir les différences:

plugins/mail/postfix_stats
58 58

  
59 59
#set -xv
60 60
SYS_LOG="${logfiles:-/var/log/syslog /var/log/syslog.0}"
61

  
62
# shellcheck disable=SC2154
61 63
PFLOGSUMM="${pflogsum}"
62 64
[ -z "$PFLOGSUMM" ] && PFLOGSUMM="$(which pflogsumm pflogsumm.pl | head -1)"
63 65

  
......
105 107
#
106 108

  
107 109
# Variable to store the pflogsumm result.
108
TMP_RAW=$(eval "${PFLOGSUMM} -d today --detail 0 --zero-fill ${SYS_LOG}")
110
# shellcheck disable=SC2086
111
TMP_RAW=$("${PFLOGSUMM}" -d today --detail 0 --zero-fill ${SYS_LOG})
109 112

  
110 113
# Parse value from Raw result
111 114
# 
......
114 117
# Return U (undefined) if any error occurs
115 118
#
116 119
parseValue() {
120
	# shellcheck disable=SC2155
117 121
	local TMP_RETURN=$(echo "${TMP_RAW}" | grep -Ei "^[[:space:]]+[[:digit:]]+[[:space:]]+${1}.*$" | grep -oEi '[[:digit:]]+[[:space:]]+' | head -n 1 | sed 's: ::g')
118 122
	if [ -z "${TMP_RETURN}" ]; then
119 123
		echo 'U'

Formats disponibles : Unified diff