ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/apache2-frontend/check
Revision: 1.3
Committed: Thu Jun 18 15:31:13 2015 UTC (9 years ago) by root
Branch: MAIN
Changes since 1.2: +2 -0 lines
Log Message:
*** empty log message ***

File Contents

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