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

sshd_log: fix shellcheck warnings

This commit is contained in:
Thomas Riccardi 2016-11-12 15:00:18 +01:00
parent e6a18b5a5b
commit c04acf95ac

View File

@ -72,7 +72,7 @@ if [ "$1" = "config" ]; then
TYPE=DERIVE
fi
echo 'graph_title SSHD login stats from' $LOG
echo 'graph_title SSHD login stats from' "$LOG"
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel logins'
echo 'graph_category' security
@ -127,7 +127,7 @@ fi
if [ "$LOG" = "journald" ]; then
journalctl --no-pager --quiet --show-cursor ${CURSOR:+"--after-cursor=$CURSOR"} "$JOURNALCTL_ARG"
else
cat $LOG
cat "$LOG"
fi | \
awk -v cursor_file="$CURSOR_FILE" 'BEGIN{c["LogPass"]=0;c["LogKey"]=0;c["NoID"]=0;c["rootAttempt"]=0;c["InvUsr"]=0;c["LogPassPAM"]=0;c["Breakin"]=0;c["NoRDNS"]=0; }
/sshd\[.*Accepted password for/{c["LogPass"]++}