ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/apache2-frontend/check
Revision: 1.4
Committed: Thu Jun 18 16:35:01 2015 UTC (8 years, 11 months ago) by root
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 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/, if $ARGV[0] eq "-t";
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