From: Alexander Barton Date: Thu, 15 Nov 2012 10:48:37 +0000 (+0100) Subject: nagcollecttest: Accept full path names to test script X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=nagcollect.git;a=commitdiff_plain;h=2d96d069bbf71b06d9a9864cde5241affd047bf5 nagcollecttest: Accept full path names to test script --- 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"