initial commit of file from CVS for smeserver-check4updates on Sat Sep 7 20:13:39 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 20:13:39 +10:00
parent 9bb0dc3909
commit 684702b970
18 changed files with 660 additions and 2 deletions

View File

@@ -0,0 +1,26 @@
{
return "\n# yum check for $check4updates{repositories} updates is disabled\n" unless $yum{status} eq 'enabled';
my $freq = $check4updates{frequence} || 'daily';
my $min;
my $dom;
my $dow;
if ($freq eq 'weekly') {
$min = 22;
$dom = '*';
$dow = 0;
} elsif ($freq eq 'monthly') {
$min = 42;
$dom = 1;
$dow = '*';
} else {
$min = 2;
$dom = '*';
$dow = '*';
}
return "$min 4 $dom * $dow root "
. q{sleep $[ $RANDOM \\% 3600 ]; /sbin/e-smith/check4repositoriesupdates -m };
}