diff options
author | Renato Botelho <renato@netgate.com> | 2017-07-13 15:59:41 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-07-13 15:59:41 -0300 |
commit | ea7b8b000f02374ba332edfedfdc560db02fcdbe (patch) | |
tree | 3507c07598312028d9646a244e1bb76d302bdb05 /src | |
parent | d991f97b3662eb77d06da7cc3f7f02e62c11f839 (diff) | |
parent | ce3371fe969733c92cd91fe31d2acb69fc877986 (diff) | |
download | pfsense-ea7b8b000f02374ba332edfedfdc560db02fcdbe.zip pfsense-ea7b8b000f02374ba332edfedfdc560db02fcdbe.tar.gz |
Merge pull request #3771 from PiBa-NL/20170701-cron-fix
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 ffc4aa8..18bba0f 100644 --- a/src/etc/inc/services.inc +++ b/src/etc/inc/services.inc @@ -2869,7 +2869,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 6e99285..a698cef 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(); |