2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

proftpd: converting to /bin/sh

Some cleanup
This commit is contained in:
Steve Schnepp 2014-08-04 17:25:28 +02:00
parent e3cc768b43
commit d40562033b

View File

@ -1,6 +1,9 @@
#!/bin/bash
#! /bin/sh
# configuration :
#
# env.LOGFILE /var/log/proftpd/proftpd.log
if [[ $1 == 'config' ]]; then
if [ "$1" = 'config' ]; then
echo "graph_args --base 1000 -l 0"
echo "graph_title Serveur FTP"
echo "graph_category Ftp"
@ -11,8 +14,12 @@ if [[ $1 == 'config' ]]; then
echo "failed.draw AREA"
fi
succes=`cat /var/log/proftpd/proftpd.log | grep -c "successful"`
failed=`cat /var/log/proftpd/proftpd.log | grep -c "Login failed"`
LOGFILE=${LOGFILE:-"/var/log/proftpd/proftpd.log"}
succes=$(grep -c "successful" "$LOGFILE" )
failed=$(grep -c "Login failed" "$LOGFILE" )
echo "succes.value $succes"
echo "failed.value $failed"
exit 0