mrtg/uptime.pl

Fri, 12 Oct 2012 21:23:18 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 12 Oct 2012 21:23:18 +0200
changeset 734
6f237b68bce5
parent 160
1a36468e720c
permissions
-rw-r--r--

Correct mistakenly double inserted patch code and remove etc/sites,
because of the hard coded nature of Drupal and where it expects to
find domain paths corresponding to a multisite installation. The
correct path is share/sites and is already present.

     1 #! @l_prefix@/bin/perl
     2 ##
     3 ##  uptime.pl: provide formatted uptime(1) information
     4 ##
     6 $null = 0;
     7 $uptime = `uptime`;
     8 $hostname = `hostname`;
    10 $uptime =~ /up (.*?) day/;
    11 $up = int($1);
    13 # According to http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html
    14 # 'the external command must return 4 lines of output.'
    15 print "$up\n";
    16 print "$up\n";
    17 print "$null\n";
    18 print "$null\n";

mercurial