diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2015-11-21 01:30:05 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2015-11-21 01:30:05 +0200 |
commit | 5c35440091ede3bd1537714f1f62226e68054c2c (patch) | |
tree | 896409b7708e1659b00a4a61edca020c7af62970 /charts.d/postfix.chart.sh | |
parent | ce954f71ffa7859f14d7d4926147eef264d4b7da (diff) |
prevent uset values when postqueue is empty
Diffstat (limited to 'charts.d/postfix.chart.sh')
-rwxr-xr-x | charts.d/postfix.chart.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/charts.d/postfix.chart.sh b/charts.d/postfix.chart.sh index 0a246da626..3762e822d8 100755 --- a/charts.d/postfix.chart.sh +++ b/charts.d/postfix.chart.sh @@ -68,6 +68,9 @@ postfix_update() { # be very carefull with eval: # prepare the script and always egrep at the end the lines that are usefull, so that # even if something goes wrong, no other code can be executed + postfix_q_emails=0 + postfix_q_size=0 + eval "`$postfix_postqueue -p |\ grep "^--" |\ sed -e "s/-- \([0-9]\+\) Kbytes in \([0-9]\+\) Requests.$/local postfix_q_size=\1\nlocal postfix_q_emails=\2/g" |\ |