From d0e0101a02f2dc0ebf37ffc9dffb69439bfe803d Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Tue, 28 Nov 2000 20:29:08 +0000 Subject: [PATCH] added code to use new spong.host method of specifing host parameters --- src/lib/Spong/Network/plugins/check_http | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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", "" ); -- 2.30.2