From b7c41b9181cb7b3927f61f7f3f07a5547f688974 Mon Sep 17 00:00:00 2001 From: Romain Dessort Date: Fri, 13 May 2016 10:34:28 -0400 Subject: [PATCH] Fix #1864. Add quotes to avoid error in comparaison. --- evocheck.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evocheck.sh b/evocheck.sh index b367bad..fad90d7 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -416,8 +416,8 @@ if [ -e /etc/debian_version ]; then # Check if munin-node running and RRD files are up to date. if [ "$IS_MUNINRUNNING" = 1 ]; then pgrep munin-node >/dev/null || echo 'IS_MUNINRUNNING FAILED!' - [ $(stat -c "%Y" /var/lib/munin/*/*uptime-g.rrd |sort |tail -1) -lt $(date +"%s" -d "now - 10 minutes") ] && echo 'IS_MUNINRUNNING FAILED!' - grep -q "^graph_strategy cron" /etc/munin/munin.conf && ([ $(stat -c "%Y" /var/cache/munin/www/*/*/uptime-day.png |sort |tail -1) -lt $(date +"%s" -d "now - 10 minutes") ]) && echo 'IS_MUNINRUNNING FAILED!' + [ "$(stat -c "%Y" /var/lib/munin/*/*uptime-g.rrd |sort |tail -1)" -lt $(date +"%s" -d "now - 10 minutes") ] && echo 'IS_MUNINRUNNING FAILED!' + grep -q "^graph_strategy cron" /etc/munin/munin.conf && ([ "$(stat -c "%Y" /var/cache/munin/www/*/*/uptime-day.png |sort |tail -1)" -lt $(date +"%s" -d "now - 10 minutes") ]) && echo 'IS_MUNINRUNNING FAILED!' fi # Check if files in /home/backup/ are up-to-date