Module: check_mk
Branch: master
Commit: 29b5fd29e108c0a25e0dbdf6b1f3c7b3048896ef
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=29b5fd29e108c0…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Mar 10 18:25:23 2015 +0100
mknotifyd: fix agent output in case of unused spooler
---
agents/check_mk_agent.linux | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 6b2b316..2903421 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -517,10 +517,12 @@ then
run_cached -s omd_status 60 "omd status --bare --auto || true"
echo '<<<mknotifyd:sep(0)>>>'
for statefile in /omd/sites/*/var/log/mknotifyd.state ; do
- site=${statefile%/var/log*}
- site=${site#/omd/sites/}
- echo "[$site]"
- grep -v '^#' < $statefile
+ if [ -e "$statefile" ] ; then
+ site=${statefile%/var/log*}
+ site=${site#/omd/sites/}
+ echo "[$site]"
+ grep -v '^#' < $statefile
+ fi
done
fi