Changeset 1571


Ignore:
Timestamp:
Jun 6, 2010, 4:38:11 AM (11 years ago)
Author:
adehnert
Message:
Print the local hostname from check-ldap-certs.pl
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/locker/sbin/check-ldap-certs.pl

    r1569 r1571  
    44use File::Basename;
    55use Date::Parse;
     6use Sys::Hostname;
    67
    78my @servers = qw(cats-whiskers.mit.edu pancake-bunny.mit.edu real-mccoy.mit.edu busy-beaver.mit.edu bees-knees.mit.edu);
     9
     10my $hostname = hostname();
    811
    912my $now = time();
     
    2528
    2629  if ($verbose || ($time - $now) <= WARNING) {
    27     printf "Certificate expiring in %.2f days: %s\n", (($time - $now) / (60.0*60*24)), $server;
     30    printf "$hostname: Certificate expiring in %.2f days: %s\n", (($time - $now) / (60.0*60*24)), $server;
    2831  }
    2932}
Note: See TracChangeset for help on using the changeset viewer.