From aeb0b49ee5c442ce66e675c83dadf44ee0ea8bbf Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Sat, 14 Apr 2007 07:55:07 +0000 Subject: don't test usage if running as CGI --- lib/Smokeping/probes/Curl.pm | 3 ++- lib/Smokeping/probes/EchoPing.pm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Smokeping/probes/Curl.pm b/lib/Smokeping/probes/Curl.pm index 2e2ef01..5f237ab 100644 --- a/lib/Smokeping/probes/Curl.pm +++ b/lib/Smokeping/probes/Curl.pm @@ -188,7 +188,8 @@ sub new { $self->_init if $self->can('_init'); - $self->test_usage; + # no need for this if running as a CGI + $self->test_usage unless $ENV{SERVER_SOFTWARE}; return $self; } diff --git a/lib/Smokeping/probes/EchoPing.pm b/lib/Smokeping/probes/EchoPing.pm index 097cfe6..94f31ac 100644 --- a/lib/Smokeping/probes/EchoPing.pm +++ b/lib/Smokeping/probes/EchoPing.pm @@ -74,7 +74,8 @@ sub new { $self->_init if $self->can('_init'); - $self->test_usage; + # no need for this if running as a CGI + $self->test_usage unless $ENV{SERVER_SOFTWARE}; return $self; } -- cgit v1.2.3-24-g4f1b