initial commit of file from CVS for e-smith-base on Thu 26 Oct 11:24:52 BST 2023
This commit is contained in:
4
root/etc/e-smith/templates/etc/crontab/00setup
Normal file
4
root/etc/e-smith/templates/etc/crontab/00setup
Normal file
@@ -0,0 +1,4 @@
|
||||
SHELL=/bin/bash
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
MAILTO=root
|
||||
|
18
root/etc/e-smith/templates/etc/crontab/65_logrotate
Normal file
18
root/etc/e-smith/templates/etc/crontab/65_logrotate
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
my $interval = $logrotate{"interval"} || "7";
|
||||
|
||||
$OUT = "";
|
||||
|
||||
# Add cron rules to do custom log rotation
|
||||
|
||||
# Just for now, do it each morning. Add logic here if we want
|
||||
# to be able to tune the frequency
|
||||
my $minute = 12;
|
||||
my $hour = 01;
|
||||
my $day = "*/$interval";
|
||||
|
||||
$OUT .= "# logrotate\n";
|
||||
$OUT .= "$minute $hour $day * * root\t";
|
||||
$OUT .= "/sbin/e-smith/signal-event logrotate\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user