mrtg/webstat.pl

changeset 176
7ed48a3146ba
parent 135
cd68ee26852b
child 737
b3e405e9af87
     1.1 --- a/mrtg/webstat.pl	Mon Apr 20 12:34:08 2009 +0200
     1.2 +++ b/mrtg/webstat.pl	Mon Apr 20 12:34:50 2009 +0200
     1.3 @@ -1,4 +1,4 @@
     1.4 -#!@l_prefix@/bin/perl
     1.5 +#! @l_prefix@/bin/perl
     1.6  ##
     1.7  ##  webstats.pl: return HTTP server hits and bytes
     1.8  ##
     1.9 @@ -17,15 +17,17 @@
    1.10      if ($res =~ /Server uptime: (.*)$/) {
    1.11          $up = $1;last
    1.12      }
    1.13 -    else
    1.14 +    else {
    1.15          next
    1.16 +    }
    1.17  
    1.18      if ($res =~ /Server at/) {
    1.19          $server = $res;
    1.20          last
    1.21      }
    1.22 -    else
    1.23 +    else {
    1.24          next
    1.25 +    }
    1.26  }
    1.27  
    1.28  @res = `@l_prefix@/bin/lynx -dump http://localhost/server-status?auto`;
    1.29 @@ -55,4 +57,6 @@
    1.30  
    1.31  print "$up\n";
    1.32  print "$server";
    1.33 +print "$null\n";
    1.34 +print "$null\n";
    1.35  

mercurial