예제 #1
0
function clear_all_log_files()
{
    killbyname('syslogd');
    $log_files = array("system", "filter", "dhcpd", "vpn", "pptps", "poes", "l2tps", "openvpn", "portalauth", "ipsec", "ppps", "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();
}
예제 #2
0
function clear_all_log_files()
{
    killbyname('syslogd');
    $clog_files = array('dhcpd', 'filter', 'gateways', 'ipsec', 'l2tps', 'lighttpd', 'ntpd', 'openvpn', 'poes', 'portalauth', 'ppps', 'pptps', 'relayd', 'resolver', 'routing', 'system', 'vpn', 'wireless');
    $log_files = array('squid/access', 'squid/cache', 'squid/store');
    foreach ($clog_files as $lfile) {
        clear_clog("/var/log/{$lfile}.log", false);
    }
    foreach ($log_files as $lfile) {
        clear_log("/var/log/{$lfile}.log", false);
    }
    system_syslogd_start();
    killbyname('dhcpd');
    services_dhcpd_configure();
}
예제 #3
0
        $config['syslog']['nologprivatenets'] = $_POST['logprivatenets'] ? false : true;
        $config['syslog']['nologlighttpd'] = $_POST['loglighttpd'] ? false : true;
        $config['syslog']['rawfilter'] = $_POST['rawfilter'] ? true : false;
        if (is_numeric($_POST['filterdescriptions']) && $_POST['filterdescriptions'] > 0) {
            $config['syslog']['filterdescriptions'] = $_POST['filterdescriptions'];
        } else {
            unset($config['syslog']['filterdescriptions']);
        }
        if ($config['syslog']['enable'] == false) {
            unset($config['syslog']['remoteserver']);
            unset($config['syslog']['remoteserver2']);
            unset($config['syslog']['remoteserver3']);
        }
        write_config();
        $retval = 0;
        $retval = system_syslogd_start();
        if ($oldnologdefaultblock !== isset($config['syslog']['nologdefaultblock']) || $oldnologdefaultpass !== isset($config['syslog']['nologdefaultpass']) || $oldnologbogons !== isset($config['syslog']['nologbogons']) || $oldnologprivatenets !== isset($config['syslog']['nologprivatenets'])) {
            $retval |= filter_configure();
        }
        $savemsg = get_std_save_message($retval);
        if ($oldnologlighttpd !== isset($config['syslog']['nologlighttpd'])) {
            ob_flush();
            flush();
            log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
            send_event("service restart webgui");
            $savemsg .= "<br />" . gettext("WebGUI process is restarting.");
        }
        filter_pflog_start(true);
    }
}
$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Settings"));
<?php

require_once "/etc/inc/pkg-utils.inc";
require_once "/etc/inc/system.inc";
system_syslogd_start();