summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/vyatta-monitor-check-rule-log5
1 files changed, 1 insertions, 4 deletions
diff --git a/scripts/vyatta-monitor-check-rule-log b/scripts/vyatta-monitor-check-rule-log
index bc49491..5466edc 100644
--- a/scripts/vyatta-monitor-check-rule-log
+++ b/scripts/vyatta-monitor-check-rule-log
@@ -1,12 +1,9 @@
#!/bin/sh
-API=/bin/cli-shell-api
RULE_PATH=$1
RULE_NUM=$2
-LOG=`cli-shell-api returnEffectiveValue $RULE_PATH rule $RULE_NUM log`
-
-if [ "$LOG" != "enable" ]; then
+if ! cli-shell-api existsActive $RULE_PATH rule $RULE_NUM log; then
echo "Warning: logging is not enabled for rule $RULE_NUM"
echo "For proper monitor operation enable logging before issuing this command:"
echo "set $RULE_PATH rule $RULE_NUM log enable"