adjust
This commit is contained in:
parent
17916130a2
commit
12928b3f3c
|
@ -41,7 +41,8 @@ fi
|
||||||
|
|
||||||
if [[ $CRIT_LEVEL -gt 0 ]] || [[ $WARN_LEVEL -gt 0 ]]; then
|
if [[ $CRIT_LEVEL -gt 0 ]] || [[ $WARN_LEVEL -gt 0 ]]; then
|
||||||
# Only use the levels if the user has set one of them.
|
# Only use the levels if the user has set one of them.
|
||||||
if [[ $NUM_CRIT_UPDATES -ge $CRIT_LEVEL ]]; then
|
if [[ $CRIT_LEVEL -gt 0 ]] && [[ $NUM_CRIT_UPDATES -ge $CRIT_LEVEL ]]; then
|
||||||
|
# If the crit level is 0, that means the user has only set the --warn flag. We'll just ignore the crit level since that's what they did.
|
||||||
echo "CRITICAL - $NUM_CRIT_UPDATES critical updates available. | critical_updates=$NUM_CRIT_UPDATES"
|
echo "CRITICAL - $NUM_CRIT_UPDATES critical updates available. | critical_updates=$NUM_CRIT_UPDATES"
|
||||||
exit 2
|
exit 2
|
||||||
elif [[ $NUM_CRIT_UPDATES -ge $WARN_LEVEL ]]; then
|
elif [[ $NUM_CRIT_UPDATES -ge $WARN_LEVEL ]]; then
|
||||||
|
|
Loading…
Reference in New Issue