From fb67a8fa07077294dcc672ababe928e3390e3e64 Mon Sep 17 00:00:00 2001 From: Peter Stimpel Date: Tue, 9 Oct 2018 08:23:45 +0200 Subject: [PATCH] V1.0.7 get working directory before including config --- logcheck.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/logcheck.pl b/logcheck.pl index 8c1c425..d7cc919 100644 --- a/logcheck.pl +++ b/logcheck.pl @@ -17,6 +17,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +use File::Basename; +use File::Spec; +$dirname = File::Spec->rel2abs(dirname(__FILE__)); + require 'logcheck.conf'; $mode="run"; @@ -36,10 +40,6 @@ if (defined($logcheckpath)) { exit 1; } -use File::Basename; -use File::Spec; -$dirname = File::Spec->rel2abs(dirname(__FILE__)); - $file_pidfile = $dirname."/logcheck.pid"; $file_whitelist = $dirname."/".$file_whitelist; @@ -48,7 +48,7 @@ $file_logfilelist = $dirname."/".$file_logfilelist; sub head() { print "\n"; print "-----------------------------\n"; - print "This is logcheck.pl V1.0.6\n"; + print "This is logcheck.pl V1.0.7\n"; print "https://peters-webcorner.de\n"; print "project hosted on github\n"; print "https://github.com/pstimpel/logcheck\n\n"; -- 2.20.1