diff options
author | NOYB <Al_Stu@Frontier.com> | 2016-04-19 00:53:41 -0700 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2016-04-21 23:39:02 -0500 |
commit | 8925db61d6140f6d1e97becb1d98b90760745bc1 (patch) | |
tree | cddfff7109697d3ca8cbe0e28090fea04be38623 | |
parent | 2f5b3dcd5faca2e673bcd2c5b9c25f87875ff688 (diff) | |
download | pfsense-8925db61d6140f6d1e97becb1d98b90760745bc1.zip pfsense-8925db61d6140f6d1e97becb1d98b90760745bc1.tar.gz |
Periodic RRD & DHCP Leases RAM Disk Backup
Remove these cron jobs on full install if not using ramdisk.
-rw-r--r-- | src/etc/inc/upgrade_config.inc | 12 | ||||
-rw-r--r-- | src/usr/local/www/system_advanced_misc.php | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index 72b7c7a..08bd110 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -4892,4 +4892,16 @@ function upgrade_150_to_151() { } } } + +function upgrade_151_to_152() { + global $g, $config; + + require_once("/etc/inc/services.inc"); + + // Remove these cron jobs on full install if not using ramdisk. + 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); + } +} ?> diff --git a/src/usr/local/www/system_advanced_misc.php b/src/usr/local/www/system_advanced_misc.php index ff108d3..b6f44f4 100644 --- a/src/usr/local/www/system_advanced_misc.php +++ b/src/usr/local/www/system_advanced_misc.php @@ -288,6 +288,12 @@ if ($_POST) { 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. + 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); + } + write_config(); $retval = 0; |