From 1c67e3d6485437f4e0e3c143d9075c335c984559 Mon Sep 17 00:00:00 2001 From: Stig Sandbeck Mathisen Date: Sat, 4 Oct 2014 22:19:38 +0200 Subject: [PATCH] Save with UNIX line breaks --- plugins/powermta/powermta_vmta_recpients | 84 ++++++++++++------------ 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/plugins/powermta/powermta_vmta_recpients b/plugins/powermta/powermta_vmta_recpients index 46b53a3d..f873dc99 100755 --- a/plugins/powermta/powermta_vmta_recpients +++ b/plugins/powermta/powermta_vmta_recpients @@ -1,42 +1,42 @@ -#!/bin/bash - -vmta="208-97-205-153" -# Lets run the command to pull the vmta's in -queues=(`pmta show queue */$vmta | awk -F" " '{print $1}'`) # Pull in top queues - -# Now we need to do some further cleanup for blank or erroneous array items -unset queues[0] -unset queues[${#queues[@]}] - - - -case $1 in - config) - -echo "graph_title RGMTA2 PMTA VMTA $vmta Recipents" -echo "graph_vlabel recipents" -echo "graph_scale no" -echo "graph_category PowerMTA" -for i in ${queues[@]};do -queue=(`pmta show queue $i`) -unset queue[0] -unset queue[${#queue[@]}] - -domain=`echo "${queue[7]}" | awk -F" " '{print $1}' | cut -d/ -f1 | sed -e 's/[\.]/_/g'` -domain2=`echo "${queue[7]}" | awk -F" " '{print $1}' | cut -d/ -f1` -echo $domain'.label '$domain2 -echo $domain'.draw STACK' -done -exit 0;; -esac - -for i in ${queues[@]};do -queue=(`pmta show queue $i`) -unset queue[0] -unset queue[${#queue[@]}] - -domain=`echo "${queue[7]}" | awk -F" " '{print $1}' | cut -d/ -f1 | sed -e 's/[\.]/_/g'` -recpts=${queue[8]} -conns=${queue[10]} -echo $domain'.value '$recpts -done +#!/bin/bash + +vmta="208-97-205-153" +# Lets run the command to pull the vmta's in +queues=(`pmta show queue */$vmta | awk -F" " '{print $1}'`) # Pull in top queues + +# Now we need to do some further cleanup for blank or erroneous array items +unset queues[0] +unset queues[${#queues[@]}] + + + +case $1 in + config) + +echo "graph_title RGMTA2 PMTA VMTA $vmta Recipents" +echo "graph_vlabel recipents" +echo "graph_scale no" +echo "graph_category PowerMTA" +for i in ${queues[@]};do +queue=(`pmta show queue $i`) +unset queue[0] +unset queue[${#queue[@]}] + +domain=`echo "${queue[7]}" | awk -F" " '{print $1}' | cut -d/ -f1 | sed -e 's/[\.]/_/g'` +domain2=`echo "${queue[7]}" | awk -F" " '{print $1}' | cut -d/ -f1` +echo $domain'.label '$domain2 +echo $domain'.draw STACK' +done +exit 0;; +esac + +for i in ${queues[@]};do +queue=(`pmta show queue $i`) +unset queue[0] +unset queue[${#queue[@]}] + +domain=`echo "${queue[7]}" | awk -F" " '{print $1}' | cut -d/ -f1 | sed -e 's/[\.]/_/g'` +recpts=${queue[8]} +conns=${queue[10]} +echo $domain'.value '$recpts +done