Add --sysbackup flag to Cron.pm cron line builder
Cron.pm's install_schedule() had its own cron line builder that didn't include --sysbackup. Now it checks SYSBACKUP=yes in the schedule config and appends --sysbackup to the cron command. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -78,13 +78,16 @@ sub install_schedule {
|
||||
return (0, $err) unless defined $cron_expr;
|
||||
|
||||
# Build full cron command line
|
||||
my $remote_flag = '';
|
||||
my $extra_flags = '';
|
||||
my $remotes = $conf->{REMOTES} // '';
|
||||
$remotes =~ s/^\s+|\s+$//g;
|
||||
if ($remotes ne '') {
|
||||
$remote_flag = " --remote=$remotes";
|
||||
$extra_flags .= " --remote=$remotes";
|
||||
}
|
||||
my $cmd_line = "$cron_expr $GNIZA_BIN backup${remote_flag} >> /var/log/gniza/cron-${name}.log 2>&1";
|
||||
if (($conf->{SYSBACKUP} // '') eq 'yes') {
|
||||
$extra_flags .= " --sysbackup";
|
||||
}
|
||||
my $cmd_line = "$cron_expr $GNIZA_BIN backup${extra_flags} >> /var/log/gniza/cron-${name}.log 2>&1";
|
||||
|
||||
# Read current crontab, strip existing entry for this schedule, append new
|
||||
my $crontab = _read_crontab();
|
||||
|
||||
Reference in New Issue
Block a user