From 2d96d069bbf71b06d9a9864cde5241affd047bf5 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Thu, 15 Nov 2012 11:48:37 +0100 Subject: [PATCH] nagcollecttest: Accept full path names to test script --- client/bin/nagcollecttest | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/bin/nagcollecttest b/client/bin/nagcollecttest index 94df17a..84d66bf 100755 --- a/client/bin/nagcollecttest +++ b/client/bin/nagcollecttest @@ -1,7 +1,7 @@ #!/bin/bash # # NagCollect -- Nagios Data Collector for Passive Checks -# Copyright (c)2009-2011 Alexander Barton, alex@barton.de +# Copyright (c)2009-2012 Alexander Barton, alex@barton.de # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -27,7 +27,9 @@ if [ `id -u` -ne 0 ]; then exit 3 fi -if [ -r /usr/local/lib/nagcollect/"$1.tst" ]; then +if [ -r "$1" ]; then + tst="$1" +elif [ -r /usr/local/lib/nagcollect/"$1.tst" ]; then tst=/usr/local/lib/nagcollect/"$1.tst" elif [ -r /usr/local/lib/nagcollect/`uname`/"$1.tst" ]; then tst=/usr/local/lib/nagcollect/`uname`/"$1.tst" -- 2.39.2