VaKeR CYBER ARMY
Logo of a company Server : Apache
System : Linux host44.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
User : vapecompany ( 2719)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /lib64/nagios/plugins/nccustom/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/nagios/plugins/nccustom/check_pem_worker.pl
#!/usr/bin/perl
BEGIN {
    push @INC, '/var/cpanel/perl5/lib';
}
use strict;
use warnings FATAL => 'all';
# UNCOMMENT if run from root !!!
# use NcCustomHooks::SSL_PEM_GENERATOR;
use Data::Dumper;
# my $check_sample = NcCustomHooks::SSL_PEM_GENERATOR->get_check_file_path();
my $check_sample = '/tmp/pem_worker_test.tmp';
my %sample_info = ();
 
($sample_info{'dev'},$sample_info{'ino'},$sample_info{'mode'},$sample_info{'nlink'},
$sample_info{'uid'},$sample_info{'gid'},$sample_info{'rdev'},$sample_info{'size'},$sample_info{'atime'},
$sample_info{'mtime'},$sample_info{'ctime'},$sample_info{'blksize'},
$sample_info{'blocks'}) = stat("$check_sample") or print "Error: Can't open file $check_sample\n" and exit 2;

my $time_now = time;
my $treschold = 20;
if (($time_now - $sample_info{'mtime'}) > $treschold){
    print "Error: Check pem-queue-worker - file $check_sample is too old ! \n" and exit 2;
}
print "OK\n" and exit;

VaKeR 2022