summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/system_advanced_misc.php
diff options
context:
space:
mode:
authorNOYB <Al_Stu@Frontier.com>2016-10-09 21:55:32 -0700
committerNOYB <Al_Stu@Frontier.com>2017-01-08 19:14:16 -0800
commit029d6129c500a97952ab3b2473080c44974847de (patch)
tree98c391a2d323c6f051d4add0b9ad2407ceeb4465 /src/usr/local/www/system_advanced_misc.php
parent0869605131ba3e5d7e502af7a799e54f27d2e7f6 (diff)
downloadpfsense-029d6129c500a97952ab3b2473080c44974847de.zip
pfsense-029d6129c500a97952ab3b2473080c44974847de.tar.gz
RAM Disk Management - Update II - Restore RAM Disk Soon as it is Created and Include Logs
Restoring the RAM disk as soon as it is available will make it easier to include additional content that needs to persist across reboots for packages etc. Include the logs in the RAM disk store so they will persist across reboots.
Diffstat (limited to 'src/usr/local/www/system_advanced_misc.php')
-rw-r--r--src/usr/local/www/system_advanced_misc.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/usr/local/www/system_advanced_misc.php b/src/usr/local/www/system_advanced_misc.php
index 796a32b..f44b9b0 100644
--- a/src/usr/local/www/system_advanced_misc.php
+++ b/src/usr/local/www/system_advanced_misc.php
@@ -251,6 +251,13 @@ if ($_POST) {
unset($config['system']['dhcpbackup']);
}
}
+ if (isset($_POST['logsbackup'])) {
+ if (($_POST['logsbackup'] > 0) && ($_POST['logsbackup'] <= 24)) {
+ $config['system']['logsbackup'] = intval($_POST['logsbackup']);
+ } else {
+ unset($config['system']['logsbackup']);
+ }
+ }
// 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.
@@ -258,9 +265,11 @@ if ($_POST) {
if (!isset($config['system']['use_mfs_tmpvar'])) {
install_cron_job("/etc/rc.backup_rrd.sh", false);
install_cron_job("/etc/rc.backup_dhcpleases.sh", false);
+ install_cron_job("/etc/rc.backup_logs.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']}");
+ install_cron_job("/etc/rc.backup_logs.sh", ($config['system']['logsbackup'] > 0), $minute="0", "*/{$config['system']['logsbackup']}");
}
write_config();
@@ -541,6 +550,16 @@ $section->addInput(new Form_Input(
'it can be restored automatically on the next boot. Keep in mind that the more '.
'frequent the backup, the more writes will happen to the media.');
+$section->addInput(new Form_Input(
+ 'logsbackup',
+ 'Periodic Logs Backup',
+ 'number',
+ $config['system']['logsbackup'],
+ ['min' => 0, 'max' => 24, 'placeholder' => 'Period between 1 and 24 hours']
+))->setHelp('This will periodically backup the log directory so '.
+ 'it can be restored automatically on the next boot. Keep in mind that the more '.
+ 'frequent the backup, the more writes will happen to the media.');
+
$form->add($section);
$section = new Form_Section('Hardware Settings');
OpenPOWER on IntegriCloud