}
            log_error(gettext("[Suricata] Live-Reload of rules from auto-update is enabled..."));
            error_log(gettext("\tLive-Reload of updated rules is enabled...\n"), 3, SURICATA_RULES_UPD_LOGFILE);
            foreach ($config['installedpackages']['suricata']['rule'] as $value) {
                suricata_reload_config($value);
                error_log(gettext("\tLive swap of updated rules requested for " . convert_friendly_interface_to_friendly_descr($value['interface']) . ".\n"), 3, SURICATA_RULES_UPD_LOGFILE);
            }
            log_error(gettext("[Suricata] Live-Reload of updated rules completed..."));
            error_log(gettext("\tLive-Reload of the updated rules is complete.\n"), 3, SURICATA_RULES_UPD_LOGFILE);
        } else {
            if ($pkg_interface != "console") {
                update_status(gettext('Restarting Suricata to activate the new set of rules...'));
                update_output_window(gettext("Please wait ... restarting Suricata will take some time..."));
            }
            error_log(gettext("\tRestarting Suricata to activate the new set of rules...\n"), 3, SURICATA_RULES_UPD_LOGFILE);
            restart_service("suricata");
            if ($pkg_interface != "console") {
                update_output_window(gettext("Suricata has restarted with your new set of rules..."));
            }
            log_error(gettext("[Suricata] Suricata has restarted with your new set of rules..."));
            error_log(gettext("\tSuricata has restarted with your new set of rules.\n"), 3, SURICATA_RULES_UPD_LOGFILE);
        }
    } else {
        if ($pkg_interface != "console") {
            update_output_window(gettext("The rules update task is complete..."));
        }
    }
}
// Remove old $tmpfname files
if (is_dir("{$tmpfname}")) {
    if ($pkg_interface != "console") {
Пример #2
0
    }
}
if (isset($_GET["enable-page"])) {
    page_enable();
    exit;
}
if (isset($_POST["EnableDNSMASQ"])) {
    EnableDNSMASQ_save();
    exit;
}
if (isset($_POST["SaveConf1"])) {
    SaveConf1();
    exit;
}
if (isset($_POST["restart-dnsmasq"])) {
    restart_service();
    exit;
}
if (isset($_GET["interfaces"])) {
    interfaces();
    exit;
}
if (isset($_GET["ffm1"])) {
    main_form();
    exit;
}
if (isset($_GET["addressesReload"])) {
    echo Loadaddresses();
    exit;
}
if (isset($_GET["DnsmasqDeleteInterface"])) {
Пример #3
0
function changetoclient()
{
    global $gbl, $sgbl, $login, $ghtml;
    system("service xinetd stop");
    lxshell_return("__path_php_path", "../bin/changetoclientlogin.phps");
    lxshell_return("__path_php_path", "../bin/misc/fixftpuserclient.phps");
    restart_service("xinetd");
    $driverapp = $gbl->getSyncClass(null, 'localhost', 'web');
    createRestartFile($driverapp);
}
Пример #4
0
        case 'dnsmasq':
            services_dnsmasq_configure();
            break;
        case 'dhcpd':
            services_dhcpd_configure();
            break;
        case 'miniupnpd':
            upnp_action('restart');
            break;
        case 'racoon':
            exec("killall -9 racoon");
            sleep(1);
            vpn_ipsec_force_reload();
            break;
        default:
            restart_service($_GET['service']);
            break;
    }
    $savemsg = "{$_GET['service']} has been restarted.";
    sleep(5);
}
if ($_GET['mode'] == "startservice" and $_GET['service']) {
    switch ($_GET['service']) {
        case 'ntpd':
            system_ntp_configure();
            break;
        case 'bsnmpd':
            services_snmpd_configure();
            break;
        case 'dnsmasq':
            services_dnsmasq_configure();
        if ($pkg_interface != "console") {
            update_output_window(gettext("Warning:  No interfaces configured for Snort were found..."));
            update_output_window(gettext("No interfaces currently have Snort configured and enabled on them..."));
        }
        error_log(gettext("\tWarning:  No interfaces configured for Snort were found...\n"), 3, $snort_rules_upd_log);
    }
    /* Clear the rebuild rules flag.  */
    $rebuild_rules = false;
    /* Restart snort if already running and we are not rebooting to pick up the new rules. */
    if (is_process_running("snort") && !$g['booting']) {
        if ($pkg_interface != "console") {
            update_status(gettext('Restarting Snort to activate the new set of rules...'));
            update_output_window(gettext("Please wait ... restarting Snort will take some time..."));
        }
        error_log(gettext("\tRestarting Snort to activate the new set of rules...\n"), 3, $snort_rules_upd_log);
        restart_service("snort");
        if ($pkg_interface != "console") {
            update_output_window(gettext("Snort has restarted with your new set of rules..."));
        }
        log_error(gettext("[Snort] Snort has restarted with your new set of rules..."));
        error_log(gettext("\tSnort has restarted with your new set of rules.\n"), 3, $snort_rules_upd_log);
    } else {
        if ($pkg_interface != "console") {
            update_output_window(gettext("The rules update task is complete..."));
        }
    }
}
/*  remove $tmpfname files */
if (is_dir("{$tmpfname}")) {
    exec("/bin/rm -rf {$tmpfname}");
}