summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2011-09-01 13:01:07 -0400
committerMicah Anderson <micah@riseup.net>2011-09-01 13:01:07 -0400
commit4ddd09c2a38bd6f491f6e3a10035bf2f514ab76b (patch)
tree16d7d99f94438c29eb714b5aa3abc149a17d821a
parent15eb3c72a9ace055a9679a880ec2f1957459f204 (diff)
change the munin plugin to use /bin/echo, posix dash doesn't support the '-e' flag, so it would output things like this:
-en login_tls.value 0
-rw-r--r--files/munin/dovecot12
1 files changed, 6 insertions, 6 deletions
diff --git a/files/munin/dovecot b/files/munin/dovecot
index f335c76..64ac93f 100644
--- a/files/munin/dovecot
+++ b/files/munin/dovecot
@@ -67,7 +67,7 @@ fi
######################
# Total Logins
######################
-echo -en "login_total.value "
+/bin/echo -en "login_total.value "
NEW_TOTAL=$(egrep 'dovecot.*Login' $LOGFILE | grep "`date '+%b %e'`" | sort | wc -l)
OLD_TOTAL=$(grep TOTAL $STAT_FILE | cut -f2 -d '=')
TOTAL=$($EXPR_BIN $NEW_TOTAL - $OLD_TOTAL)
@@ -86,13 +86,13 @@ DISCON=$($EXPR_BIN $CONNECTS - $DISCONNECTS)
if [ $DISCON -lt 0 ]; then
DISCON=0
fi
-echo -en "connected.value "
+/bin/echo -en "connected.value "
echo $DISCON
echo -n
######################
# TLS Logins
######################
-echo -en "login_tls.value "
+/bin/echo -en "login_tls.value "
NEW_TLS=$(egrep 'dovecot.*Login.*TLS' $LOGFILE | grep "`date '+%b %e'`" | sort | wc -l)
OLD_TLS=$(grep TLS $STAT_FILE | cut -f2 -d '=')
TLS=$($EXPR_BIN $NEW_TLS - $OLD_TLS)
@@ -105,7 +105,7 @@ echo -n
######################
# SSL Logins
######################
-echo -en "login_ssl.value "
+/bin/echo -en "login_ssl.value "
NEW_SSL=$(egrep 'dovecot.*Login.*SSL' $LOGFILE | grep "`date '+%b %e'`" | sort | wc -l)
OLD_SSL=$(grep SSL $STAT_FILE | cut -f2 -d '=')
SSL=$($EXPR_BIN $NEW_SSL - $OLD_SSL)
@@ -118,7 +118,7 @@ echo -n
######################
# IMAP Logins
######################
-echo -en "login_imap.value "
+/bin/echo -en "login_imap.value "
NEW_IMAP=$(egrep 'dovecot.*imap.*Login' $LOGFILE | grep "`date '+%b %e'`" | sort | wc -l)
OLD_IMAP=$(grep IMAP $STAT_FILE | cut -f2 -d '=')
IMAP=$($EXPR_BIN $NEW_IMAP - $OLD_IMAP)
@@ -131,7 +131,7 @@ echo -n
######################
# POP3 Logins
######################
-echo -en "login_pop3.value "
+/bin/echo -en "login_pop3.value "
NEW_POP3=$(egrep 'dovecot.*pop3.*Login' $LOGFILE | grep "`date '+%b %e'`" | sort | wc -l)
OLD_POP3=$(grep POP3 $STAT_FILE | cut -f2 -d '=')
POP3=$($EXPR_BIN $NEW_POP3 - $OLD_POP3)