Module: check_mk
Branch: master
Commit: 89dd6d9ebbcc5d68dc7c13204f61d31b5e7bddd1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=89dd6d9ebbcc5d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jun 27 08:56:23 2013 +0200
jar_signature: avoid entry for "*.jar"
---
agents/plugins/jar_signature | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/agents/plugins/jar_signature b/agents/plugins/jar_signature
index 76bb431..7309923 100755
--- a/agents/plugins/jar_signature
+++ b/agents/plugins/jar_signature
@@ -36,10 +36,12 @@ PATH=$JAVA_HOME/bin:$PATH
echo "<<<jar_signature>>>"
for JAR in $JAR_PATH; do
- echo "[[[${JAR##*/}]]]"
- OUTPUT=$(jarsigner -verify -verbose -certs "$JAR")
- LINE=$(echo "$OUTPUT" | grep -n ^s | tail -n1 | cut -d: -f1)
- echo "$(echo "$OUTPUT" | tail -n +$LINE)"
- echo
+ if [ -e "$JAR" ] ; then # avoid entry for '*.jar'
+ echo "[[[${JAR##*/}]]]"
+ OUTPUT=$(jarsigner -verify -verbose -certs "$JAR")
+ LINE=$(echo "$OUTPUT" | grep -n ^s | tail -n1 | cut -d: -f1)
+ echo "$(echo "$OUTPUT" | tail -n +$LINE)"
+ echo
+ fi
done