summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNOYB <Al_Stu@Frontier.com>2016-04-19 18:17:16 -0700
committerChris Buechler <cmb@pfsense.org>2016-04-21 23:39:06 -0500
commitbdba53e9336ae05c9b8273fcb45cd12673edcee0 (patch)
tree84625d8695a9dfbb8685213cca4c05c05739de00
parent8925db61d6140f6d1e97becb1d98b90760745bc1 (diff)
downloadpfsense-bdba53e9336ae05c9b8273fcb45cd12673edcee0.zip
pfsense-bdba53e9336ae05c9b8273fcb45cd12673edcee0.tar.gz
Move the install cron job calls into an if/else so they are not added then immediately removed.
-rw-r--r--src/usr/local/www/system_advanced_misc.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/usr/local/www/system_advanced_misc.php b/src/usr/local/www/system_advanced_misc.php
index b6f44f4..d690d38 100644
--- a/src/usr/local/www/system_advanced_misc.php
+++ b/src/usr/local/www/system_advanced_misc.php
@@ -277,7 +277,6 @@ if ($_POST) {
} else {
unset($config['system']['rrdbackup']);
}
- install_cron_job("/etc/rc.backup_rrd.sh", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}");
}
if (isset($_POST['dhcpbackup'])) {
if (($_POST['dhcpbackup'] > 0) && ($_POST['dhcpbackup'] <= 24)) {
@@ -285,13 +284,17 @@ if ($_POST) {
} else {
unset($config['system']['dhcpbackup']);
}
- install_cron_job("/etc/rc.backup_dhcpleases.sh", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}");
}
- // Remove these cron jobs on full install if not using ramdisk.
+ // Add/Remove RAM disk periodic backup cron jobs according to settings and installation type.
+ // Remove the cron jobs on full install if not using RAM disk.
+ // Add the cron jobs on all others if the periodic backup option is set. Otherwise the cron job is removed.
if (($g['platform'] == $g['product_name']) && !isset($config['system']['use_mfs_tmpvar'])) {
install_cron_job("/etc/rc.backup_rrd.sh", false);
install_cron_job("/etc/rc.backup_dhcpleases.sh", false);
+ } else {
+ install_cron_job("/etc/rc.backup_rrd.sh", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}");
+ install_cron_job("/etc/rc.backup_dhcpleases.sh", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}");
}
write_config();
OpenPOWER on IntegriCloud