X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins-scripts%2Fcheck_log.sh;h=a1bfb486c7afa021f5d374de30d8e5cf8bcf4b23;hb=refs%2Fheads%2Fsh%2Fcheck_pgsql;hp=601c6930308388a20c6d37446fd65bfe562c4580;hpb=450054438c2763c0ce26985ccf6c5d890d2c6f2a;p=nagiosplug.git diff --git a/plugins-scripts/check_log.sh b/plugins-scripts/check_log.sh index 601c693..a1bfb48 100755 --- a/plugins-scripts/check_log.sh +++ b/plugins-scripts/check_log.sh @@ -57,8 +57,8 @@ # Paths to commands used in this script. These # may have to be modified to match your system setup. - -PATH="" +# TV: removed PATH restriction. Need to think more about what this means overall +#PATH="" ECHO="/bin/echo" GREP="/bin/egrep" @@ -71,7 +71,7 @@ TOUCH="/bin/touch" PROGNAME=`/bin/basename $0` PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` -REVISION=`echo '$Revision$' | sed -e 's/[^0-9.]//g'` +REVISION="@NP_VERSION@" . $PROGPATH/utils.sh @@ -116,11 +116,11 @@ while test -n "$1"; do exit $STATE_OK ;; --version) - print_revision $PROGNAME $VERSION + print_revision $PROGNAME $REVISION exit $STATE_OK ;; -V) - print_revision $PROGNAME $VERSION + print_revision $PROGNAME $REVISION exit $STATE_OK ;; --filename) @@ -197,7 +197,7 @@ else $CHMOD 600 $tempdiff fi -$DIFF $logfile $oldlog > $tempdiff +$DIFF $logfile $oldlog | $GREP -v "^>" > $tempdiff # Count the number of matching log entries we have count=`$GREP -c "$query" $tempdiff`