mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
sshd_log: cleanup autoconf
* always return 0 * add details on autoconf failure
This commit is contained in:
parent
c04acf95ac
commit
ff68f64155
@ -47,21 +47,18 @@ JOURNALCTL_ARG=${journalctlarg:-_COMM=sshd}
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ "$LOG" = "journald" ]; then
|
||||
if journalctl --no-pager --quiet --lines=1 "$JOURNALCTL_ARG" | read -r DUMMY; then
|
||||
echo yes
|
||||
exit 0
|
||||
echo "yes"
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
echo "no (journald empty log for '$JOURNALCTL_ARG' not found)"
|
||||
fi
|
||||
else
|
||||
if [ -r "$LOG" ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
echo "yes"
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
echo "no (logfile '$LOG' not readable)"
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user