warning when 10 < >= 20

This commit is contained in:
n 2018-03-06 21:46:43 +01:00
parent aa9f90f802
commit 1d6b4d9315
1 changed files with 7 additions and 1 deletions

View File

@ -9,11 +9,17 @@ then
exit 3
fi
result=`echo "$score > 10" | bc`
result=`echo "$score >= 20" | bc`
if [ $result == 1 ]
then
echo "OK: score=$score|score=$score;;;;"
exit 0
fi
result=`echo "$score > 10" | bc`
if [ $result == 1 ]
then
echo "WARNING: score=$score|score=$score;;;;"
exit 1
else
echo "CRITICAL: score=$score|score=$score;;;;"
exit 2