From: Stephen L Johnson Date: Tue, 28 Nov 2000 20:29:08 +0000 (+0000) Subject: added code to use new spong.host method of specifing host parameters X-Git-Tag: spong-2_7_2~52 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0e0101a02f2dc0ebf37ffc9dffb69439bfe803d;p=spong.git added code to use new spong.host method of specifing host parameters --- diff --git a/src/lib/Spong/Network/plugins/check_http b/src/lib/Spong/Network/plugins/check_http index 31dbb9f..02342c6 100755 --- a/src/lib/Spong/Network/plugins/check_http +++ b/src/lib/Spong/Network/plugins/check_http @@ -10,8 +10,14 @@ sub check_http { my( $host ) = @_; my( @http_files ) = ( @{$HTTPDOCS{"ALL"}}, @{$HTTPDOCS{$host}} ); my( $http_port ) = $HTTPPORT{$host} || $HTTPPORT{"ALL"} || 80; - my( @http_urls ) = ( @{$HTTPURLS{$host}} ); - @http_urls = (@{$HTTPURLS{'DEFAULT'}}) if ! @http_urls; + # Find list of URL's to check + my( @http_urls ) = @{$HTTPURLS{$host}} || # Old style configs + @{$HTTPURLS{'DEFAULT'}} || + $HOSTS{$host}->{'http_urls'} || # New style configs + $HOSTS_DEFAULTS{'http_urls'}; + # Append mandatory urls to check + @http_urls = ( @http_urls, @{$HOSTS_ALL{'http_urls'}} ); + my( $file, $tmessage ) = ( "", "" ); my( $color, $summary ) = ( "green", "" );