Server IP : 162.0.209.157 / Your IP : 18.118.144.50 [ Web Server : LiteSpeed System : Linux premium178.web-hosting.com 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64 User : balaoqob ( 2395) PHP Version : 8.0.30 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /lib64/nagios/plugins/nccustom/ |
Upload File : |
#!/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;