]> arthur.barton.de Git - netdata.git/commitdiff
prevent uset values when postqueue is empty
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Fri, 20 Nov 2015 23:30:05 +0000 (01:30 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Fri, 20 Nov 2015 23:30:05 +0000 (01:30 +0200)
charts.d/postfix.chart.sh

index 0a246da626bf4e5f801121d02402a27ac7b9bc31..3762e822d82222d96ff4fa5e373338bdde8fc1d2 100755 (executable)
@@ -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" |\