diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2017-07-01 23:01:08 +0200 |
---|---|---|
committer | PiBa-NL <pba_2k3@yahoo.com> | 2017-07-01 23:01:08 +0200 |
commit | ce3371fe969733c92cd91fe31d2acb69fc877986 (patch) | |
tree | 84d47125504d4de14b929f1dc2b9682d973ff224 /src | |
parent | 05ae852482def5fce3f87bc2d61f07de53cec39a (diff) | |
download | pfsense-ce3371fe969733c92cd91fe31d2acb69fc877986.zip pfsense-ce3371fe969733c92cd91fe31d2acb69fc877986.tar.gz |
cron, fix job removal by index splice and write valid schedules for ramdrive backups
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/services.inc | 2 | ||||
-rw-r--r-- | src/usr/local/www/system_advanced_misc.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc index f7aadd8..3055619 100644 --- a/src/etc/inc/services.inc +++ b/src/etc/inc/services.inc @@ -2868,7 +2868,7 @@ function install_cron_job($command, $active = false, $minute = "0", $hour = "*", } } else { if ($is_installed == true) { - unset($config['cron']['item'][$x]); + array_splice($config['cron']['item'], $x, 1); $change_message = "Removed cron job for %s"; } else { $cron_changed = false; diff --git a/src/usr/local/www/system_advanced_misc.php b/src/usr/local/www/system_advanced_misc.php index c2f6be7..7c63537 100644 --- a/src/usr/local/www/system_advanced_misc.php +++ b/src/usr/local/www/system_advanced_misc.php @@ -271,9 +271,9 @@ if ($_POST) { install_cron_job("/etc/rc.backup_logs.sh", false, null, null, null, null, null, null, false); } else { /* See #7146 for detail on why the extra parameters are needed for the time being. */ - install_cron_job("/etc/rc.backup_rrd.sh", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}", null, null, null, null, false); - install_cron_job("/etc/rc.backup_dhcpleases.sh", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}", null, null, null, null, false); - install_cron_job("/etc/rc.backup_logs.sh", ($config['system']['logsbackup'] > 0), $minute="0", "*/{$config['system']['logsbackup']}", null, null, null, null, false); + install_cron_job("/etc/rc.backup_rrd.sh", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}", '*', '*', '*', 'root', false); + install_cron_job("/etc/rc.backup_dhcpleases.sh", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}", '*', '*', '*', 'root', false); + install_cron_job("/etc/rc.backup_logs.sh", ($config['system']['logsbackup'] > 0), $minute="0", "*/{$config['system']['logsbackup']}", '*', '*', '*', 'root', false); } write_config(); |