diff --git a/whm/gniza-whm/lib/GnizaWHM/Cron.pm b/whm/gniza-whm/lib/GnizaWHM/Cron.pm index 75b0101..9f18197 100644 --- a/whm/gniza-whm/lib/GnizaWHM/Cron.pm +++ b/whm/gniza-whm/lib/GnizaWHM/Cron.pm @@ -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();