summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2017-07-01 23:01:08 +0200
committerPiBa-NL <pba_2k3@yahoo.com>2017-07-01 23:01:08 +0200
commitce3371fe969733c92cd91fe31d2acb69fc877986 (patch)
tree84d47125504d4de14b929f1dc2b9682d973ff224 /src
parent05ae852482def5fce3f87bc2d61f07de53cec39a (diff)
downloadpfsense-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.inc2
-rw-r--r--src/usr/local/www/system_advanced_misc.php6
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();
OpenPOWER on IntegriCloud