mrtg/uptime.pl

Wed, 12 Sep 2012 18:46:46 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 12 Sep 2012 18:46:46 +0200
changeset 674
dd46abb0afa8
parent 160
1a36468e720c
permissions
-rw-r--r--

Correct problem of missing datadir (/share) directory, caused by recent
policy change of distribution of empty virus definitions in
database/Makefile.in. Additionally correct the permissions of
the datadir to allow freshclam(1) to properly write to it.

     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