|
|
|
@ -11,8 +11,10 @@ my (undef,undef,$bkpuid,$bkpgid) = getpwnam('backuppc'); |
|
|
|
|
setuid($bkpuid) if ($uid ne $bkpuid); |
|
|
|
|
setgid($bkpgid) if ($gid ne $bkpgid); |
|
|
|
|
|
|
|
|
|
# Precise the host to check |
|
|
|
|
my $host = $ARGV[0]; |
|
|
|
|
|
|
|
|
|
# Get values |
|
|
|
|
my $bpc = BackupPC::Lib->new(); |
|
|
|
|
my @backups = $bpc->BackupInfoRead($host); |
|
|
|
|
my $mainConf = $bpc->ConfigDataRead(); |
|
|
|
@ -55,6 +57,7 @@ else { |
|
|
|
|
$lastXferErrors = $backups[@backups-1]{xferErrs} if ( @backups ); |
|
|
|
|
$maxErrors = $conf->{MaxXferError} if (defined $conf->{MaxXferError}); |
|
|
|
|
|
|
|
|
|
# Print results |
|
|
|
|
print<<"EOF"; |
|
|
|
|
Usage: $0 <host> |
|
|
|
|
|
|
|
|
|