]> git.etc.gen.nz Git - spong.git/commitdiff
added code to use new spong.host method of specifing host parameters
authorStephen L Johnson <sjohnson@monsters.org>
Tue, 28 Nov 2000 20:29:08 +0000 (20:29 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Tue, 28 Nov 2000 20:29:08 +0000 (20:29 +0000)
src/lib/Spong/Network/plugins/check_http

index 31dbb9f098689f23be58b9cdaeafa15680d4f3da..02342c688159dc987c8db04a424ecc2410cd003c 100755 (executable)
@@ -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", "" );