diff options
author | NOYB <Al_Stu@Frontier.com> | 2015-12-20 00:02:33 -0800 |
---|---|---|
committer | NOYB <Al_Stu@Frontier.com> | 2016-01-06 13:38:26 -0800 |
commit | 8173741de3d4bb85403090b957872582e613a49b (patch) | |
tree | b8c2c3749662a50ccffb328e545845bdf38093d9 /src/usr/local/www/status_logs_vpn.php | |
parent | 2fd8976f4d97f3f9e40f0ab0fc658be60548f716 (diff) | |
download | pfsense-8173741de3d4bb85403090b957872582e613a49b.zip pfsense-8173741de3d4bb85403090b957872582e613a49b.tar.gz |
Staus - System - Logs - VPN - Write Config Only
If no logging changes have been made, only write the config file.
Diffstat (limited to 'src/usr/local/www/status_logs_vpn.php')
-rw-r--r-- | src/usr/local/www/status_logs_vpn.php | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/usr/local/www/status_logs_vpn.php b/src/usr/local/www/status_logs_vpn.php index 73470b2..0f32b22 100644 --- a/src/usr/local/www/status_logs_vpn.php +++ b/src/usr/local/www/status_logs_vpn.php @@ -207,17 +207,27 @@ if ($save_settings) { if ($logfile == 'system') { $oldnologlighttpd = isset($config['syslog']['nologlighttpd']); $config['syslog']['nologlighttpd'] = $loglighttpd ? false : true; + + if ($oldnologlighttpd !== $config['syslog']['nologlighttpd']) { + $logging_changed = $lighttpd_logging_changed = true; + } } - write_config($desc = "Log Display Settings Saved: " . gettext($allowed_logs[$logfile]["name"])); + // If any of the logging settings were changed then backup and sync (standard write_config). Otherwise only write config (don't backup, don't sync). + if ($logging_changed) { + write_config($desc = "Log Display Settings Saved: " . gettext($allowed_logs[$logfile]["name"]), $backup = true, $write_config_only = false); + $retval = 0; + $retval = system_syslogd_start(); + } else { + write_config($desc = "Log Display Settings Saved (no backup, no sync): " . gettext($allowed_logs[$logfile]["name"]), $backup = false, $write_config_only = true); + } - $retval = 0; - $savemsg = get_std_save_message($retval); + $savemsg = gettext("The changes have been applied successfully."); # System General (main) Specific if ($logfile == 'system') { - if ($oldnologlighttpd !== isset($config['syslog']['nologlighttpd'])) { + if ($lighttpd_logging_changed) { ob_flush(); flush(); log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator.")); |