ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/apache2-frontend/check
Revision: 1.2
Committed: Tue Jun 16 02:40:22 2015 UTC (8 years, 11 months ago) by root
Branch: MAIN
Changes since 1.1: +2 -1 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 #!/opt/bin/perl
2    
3 root 1.2 use FindBin;
4 root 1.1 use LWP::Simple;
5    
6 root 1.2 open my $fh, "<", "$FindBin::Bin/checklist"
7 root 1.1 or die "check.txt: $!";
8    
9     while (<$fh>) {
10     chomp;
11     my ($url, $content) = split /\t+/;
12    
13     $url =~ s,^([^/]+)/,$1:34567/,;
14    
15     $url = "http://$url";
16    
17     my $res = get $url;
18    
19     if ($res =~ $content) {
20     print "$url OK\n";
21     } else {
22     print "$url NOT OK\n";
23     print "$res\n$content\n";
24     exit 1;
25     }
26     }
27