mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
(legacy) move clear_all_log_files to diag_logs_settings.php
This commit is contained in:
parent
ea5dd43a31
commit
5d19cbce6d
@ -31,6 +31,27 @@ require_once("guiconfig.inc");
|
||||
require_once("functions.inc");
|
||||
require_once("filter.inc");
|
||||
require_once("system.inc");
|
||||
require_once("pfsense-utils.inc");
|
||||
|
||||
function clear_all_log_files()
|
||||
{
|
||||
killbyname('syslogd');
|
||||
|
||||
$log_files = array(
|
||||
"system", "filter", "dhcpd", "vpn", "pptps", "poes", "l2tps", "openvpn", "portalauth",
|
||||
"ipsec", "ppp", "relayd", "wireless", "lighttpd", "ntpd", "gateways", "resolver", "routing"
|
||||
);
|
||||
|
||||
foreach ($log_files as $lfile) {
|
||||
clear_log_file("/var/log/{$lfile}.log", false);
|
||||
}
|
||||
|
||||
system_syslogd_start();
|
||||
killbyname("dhcpd");
|
||||
services_dhcpd_configure();
|
||||
}
|
||||
|
||||
|
||||
|
||||
$pconfig['reverse'] = isset($config['syslog']['reverse']);
|
||||
$pconfig['nentries'] = $config['syslog']['nentries'];
|
||||
|
||||
@ -375,24 +375,6 @@ function clear_log_file($logfile = '/var/log/system.log', $restart_syslogd = tru
|
||||
}
|
||||
}
|
||||
|
||||
function clear_all_log_files()
|
||||
{
|
||||
killbyname('syslogd');
|
||||
|
||||
$log_files = array(
|
||||
"system", "filter", "dhcpd", "vpn", "pptps", "poes", "l2tps", "openvpn", "portalauth",
|
||||
"ipsec", "ppp", "relayd", "wireless", "lighttpd", "ntpd", "gateways", "resolver", "routing"
|
||||
);
|
||||
|
||||
foreach ($log_files as $lfile) {
|
||||
clear_log_file("/var/log/{$lfile}.log", false);
|
||||
}
|
||||
|
||||
system_syslogd_start();
|
||||
killbyname("dhcpd");
|
||||
services_dhcpd_configure();
|
||||
}
|
||||
|
||||
function dump_clog($logfile, $tail, $withorig = true, $grepfor = "", $grepinvert = "") {
|
||||
global $g, $config;
|
||||
$sor = isset($config['syslog']['reverse']) ? "-r" : "";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user