当前位置: 首页>>代码示例>>PHP>>正文


PHP killbyname函数代码示例

本文整理汇总了PHP中killbyname函数的典型用法代码示例。如果您正苦于以下问题:PHP killbyname函数的具体用法?PHP killbyname怎么用?PHP killbyname使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了killbyname函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: clear_all_log_files

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();
}
开发者ID:Toudix,项目名称:core,代码行数:11,代码来源:diag_logs_settings.php

示例2: clear_all_log_files

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();
}
开发者ID:8191,项目名称:opnsense-core,代码行数:15,代码来源:diag_logs_settings.php

示例3: killbyname

	hideInput('ssl-certref', $('input[name=webguiproto]:checked').val() == 'http');

	// ---------- Click checkbox handlers ---------------------------------------------------------

	 $('[id=webguiproto]').click(function () {
		hideInput('ssl-certref', $('input[name=webguiproto]:checked').val() == 'http');
	});
});
//]]>
</script>

<?php 
include "foot.inc";
if ($restart_webgui) {
    echo "<meta http-equiv=\"refresh\" content=\"20;url={$url}\" />";
}
if ($restart_sshd) {
    killbyname("sshd");
    log_error(gettext("secure shell configuration has changed. Stopping sshd."));
    if ($config['system']['enablesshd']) {
        log_error(gettext("secure shell configuration has changed. Restarting sshd."));
        send_event("service restart sshd");
    }
}
if ($restart_webgui) {
    ob_flush();
    flush();
    log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
    send_event("service restart webgui");
}
开发者ID:calvinbui,项目名称:pfsense,代码行数:30,代码来源:system_advanced_admin.php

示例4: elseif

        if (is_numeric($pool) && is_array($a_pools[$pool])) {
            $a_pools[$pool] = $dhcpdconf;
        } elseif ($act == "newpool") {
            $a_pools[] = $dhcpdconf;
        } else {
            $config['dhcpd'][$if] = $dhcpdconf;
        }
        write_config();
    }
}
if (isset($_POST['submit']) || isset($_POST['apply'])) {
    $retval = 0;
    $retvaldhcp = 0;
    $retvaldns = 0;
    /* Stop DHCP so we can cleanup leases */
    killbyname("dhcpd");
    dhcp_clean_leases();
    system_hosts_generate();
    /* dnsmasq_configure calls dhcpd_configure */
    /* no need to restart dhcpd twice */
    if (isset($config['dnsmasq']['enable']) && isset($config['dnsmasq']['regdhcpstatic'])) {
        $retvaldns = services_dnsmasq_configure();
        if ($retvaldns == 0) {
            clear_subsystem_dirty('hosts');
            clear_subsystem_dirty('staticmaps');
        }
    } else {
        if (isset($config['unbound']['enable']) && isset($config['unbound']['regdhcpstatic'])) {
            $retvaldns = services_unbound_configure();
            if ($retvaldns == 0) {
                clear_subsystem_dirty('unbound');
开发者ID:karawan,项目名称:core,代码行数:31,代码来源:services_dhcp.php

示例5: killbyname

$suricatadir = SURICATADIR;
$suricatalogdir = SURICATALOGDIR;
$flowbit_rules_file = FLOWBITS_FILENAME;
$suricata_enforcing_rules_file = SURICATA_ENFORCING_RULES_FILENAME;
$rcdir = RCFILEPREFIX;
// Hard kill any running Suricata process that may have been started by any
// of the pfSense scripts such as check_reload_status() or rc.start_packages
if (is_process_running("suricata")) {
    killbyname("suricata");
    sleep(2);
    // Delete any leftover suricata PID files in /var/run
    unlink_if_exists("{$g['varrun_path']}/suricata_*.pid");
}
// Hard kill any running Barnyard2 processes
if (is_process_running("barnyard")) {
    killbyname("barnyard2");
    sleep(2);
    // Delete any leftover barnyard2 PID files in /var/run
    unlink_if_exists("{$g['varrun_path']}/barnyard2_*.pid");
}
// Set flag for post-install in progress
$g['suricata_postinstall'] = true;
// Mount file system read/write so we can modify some files
conf_mount_rw();
// Remove any previously installed script since we rebuild it
unlink_if_exists("{$rcdir}suricata.sh");
// Create the top-tier log directory
safe_mkdir(SURICATALOGDIR);
// Create the IP Rep and SID Mods lists directory
safe_mkdir(SURICATA_SID_MODS_PATH);
safe_mkdir(SURICATA_IPREP_PATH);
开发者ID:LFCavalcanti,项目名称:pfsense-packages,代码行数:31,代码来源:suricata_post_install.php

示例6: service_control_stop

function service_control_stop($name, $extras)
{
    switch ($name) {
        case 'radvd':
            killbypid("/var/run/radvd.pid");
            break;
        case 'ntpd':
            killbyname("ntpd");
            break;
        case 'apinger':
            killbypid("/var/run/apinger.pid");
            break;
        case 'bsnmpd':
            killbypid("/var/run/snmpd.pid");
            break;
        case 'choparp':
            killbyname("choparp");
            break;
        case 'dhcpd':
            killbyname("dhcpd");
            break;
        case 'dhcrelay':
            killbypid("/var/run/dhcrelay.pid");
            break;
        case 'dhcrelay6':
            killbypid("/var/run/dhcrelay6.pid");
            break;
        case 'dnsmasq':
            killbypid("/var/run/dnsmasq.pid");
            break;
        case 'unbound':
            killbypid("/var/run/unbound.pid");
            break;
        case 'igmpproxy':
            killbyname("igmpproxy");
            break;
        case 'miniupnpd':
            upnp_action('stop');
            break;
        case 'sshd':
            killbyname("sshd");
            break;
        case 'ipsec':
            exec("/usr/local/sbin/ipsec stop");
            break;
        case 'openvpn':
            $vpnmode = htmlspecialchars($extras['vpnmode']);
            if ($vpnmode == "server" or $vpnmode == "client") {
                $id = htmlspecialchars($extras['id']);
                $pidfile = "/var/run/openvpn_{$vpnmode}{$id}.pid";
                killbypid($pidfile);
            }
            break;
        case 'relayd':
            mwexec('pkill relayd');
            break;
        case 'squid':
            configd_run("proxy stop");
            break;
        case 'suricata':
            configd_run("ids stop");
            break;
        default:
            log_error(sprintf(gettext("Could not stop unknown service `%s'"), $name));
            break;
    }
    return sprintf(gettext("%s has been stopped."), htmlspecialchars($name));
}
开发者ID:8191,项目名称:opnsense-core,代码行数:68,代码来源:status_services.php

示例7: clear_hook

function clear_hook()
{
    killbyname('dhcpd');
    services_dhcpd_configure();
}
开发者ID:paudam,项目名称:opnsense-core,代码行数:5,代码来源:diag_logs_dhcp.php

示例8: unset

 $config['dhcpdv6'][$if]['netboot'] = $_POST['netboot'] ? true : false;
 $config['dhcpdv6'][$if]['nextserver'] = $_POST['nextserver'];
 $config['dhcpdv6'][$if]['filename'] = $_POST['filename'];
 $config['dhcpdv6'][$if]['rootpath'] = $_POST['rootpath'];
 $config['dhcpdv6'][$if]['dhcpv6leaseinlocaltime'] = $_POST['dhcpv6leaseinlocaltime'];
 // Handle the custom options rowhelper
 if (isset($config['dhcpdv6'][$if]['numberoptions']['item'])) {
     unset($config['dhcpdv6'][$if]['numberoptions']['item']);
 }
 $config['dhcpdv6'][$if]['numberoptions'] = $numberoptions;
 write_config();
 $retval = 0;
 $retvaldhcp = 0;
 $retvaldns = 0;
 /* Stop DHCPv6 so we can cleanup leases */
 killbyname("dhcpd -6");
 // dhcp_clean_leases();
 /* dnsmasq_configure calls dhcpd_configure */
 /* no need to restart dhcpd twice */
 if (isset($config['dnsmasq']['regdhcpstatic'])) {
     $retvaldns = services_dnsmasq_configure();
     if ($retvaldns == 0) {
         clear_subsystem_dirty('hosts');
         clear_subsystem_dirty('staticmaps');
     }
 } else {
     $retvaldhcp = services_dhcpd_configure();
     if ($retvaldhcp == 0) {
         clear_subsystem_dirty('staticmaps');
     }
 }
开发者ID:rdmenezes,项目名称:pfsense,代码行数:31,代码来源:services_dhcpv6.php


注:本文中的killbyname函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。