����JFIF��x�x����'
| Server IP : 78.140.185.180 / Your IP : 216.73.216.170 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/self/root/proc/1630575/root/usr/lib64/nagios/plugins/extra/ |
Upload File : |
#!/usr/bin/env perl
use strict;
use warnings;
use Text::Diff;
use extreme;
use File::Copy;
use English;
exec "sudo $0" if $UID > 0;
my $bkps_dir = '/root/.lang_bkps';
mkdir $bkps_dir;
my $lang_dir = '/usr/local/directadmin/data/skins/evolution/lang';
if ( ! -d "$lang_dir/en/internal" || ! -f "$lang_dir/dictionary.pot" || ! -f "$lang_dir/login-dictionary.pot" ) {
say "Some files or dirs not found";
exit 2;
}
my @files = `ls "$lang_dir/en/internal"`;
chomp @files;
my @diffs;
push @files, 'dictionary.pot';
push @files, 'login-dictionary.pot';
for my $file (@files) {
my $bkp_file = "bkp_$file";
my $dir = "$lang_dir/en/internal";
$dir = $lang_dir if $file =~ /^(dictionary\.pot|login-dictionary\.pot)$/;
copy("$dir/$file","$bkps_dir/$bkp_file") if ! -f "$bkps_dir/$bkp_file";
my $diff = diff "$bkps_dir/$bkp_file" => "$dir/$file";
push @diffs, $diff if $diff;
}
if ( @diffs ) {
say "Lang files difference found";
say @diffs;
exit 2;
}
else {
say "OK";
}