當前位置: 首頁>>代碼示例>>PHP>>正文


PHP system_ntp_configure函數代碼示例

本文整理匯總了PHP中system_ntp_configure函數的典型用法代碼示例。如果您正苦於以下問題:PHP system_ntp_configure函數的具體用法?PHP system_ntp_configure怎麽用?PHP system_ntp_configure使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了system_ntp_configure函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: service_control_restart

function service_control_restart($name, $extras)
{
    switch ($name) {
        case 'radvd':
            services_radvd_configure();
            break;
        case 'ntpd':
            system_ntp_configure();
            break;
        case 'apinger':
            killbypid("/var/run/apinger.pid");
            setup_gateways_monitor();
            break;
        case 'bsnmpd':
            services_snmpd_configure();
            break;
        case 'dhcrelay':
            services_dhcrelay_configure();
            break;
        case 'dhcrelay6':
            services_dhcrelay6_configure();
            break;
        case 'dnsmasq':
            services_dnsmasq_configure();
            break;
        case 'unbound':
            services_unbound_configure();
            break;
        case 'dhcpd':
            services_dhcpd_configure();
            break;
        case 'igmpproxy':
            services_igmpproxy_configure();
            break;
        case 'miniupnpd':
            upnp_action('restart');
            break;
        case 'ipsec':
            vpn_ipsec_force_reload();
            break;
        case 'sshd':
            configd_run("sshd restart");
            break;
        case 'openvpn':
            $vpnmode = htmlspecialchars($extras['vpnmode']);
            if ($vpnmode == "server" || $vpnmode == "client") {
                $id = htmlspecialchars($extras['id']);
                $configfile = "/var/etc/openvpn/{$vpnmode}{$id}.conf";
                if (file_exists($configfile)) {
                    openvpn_restart_by_vpnid($vpnmode, $id);
                }
            }
            break;
        case 'relayd':
            relayd_configure(true);
            break;
        case 'squid':
            configd_run("proxy restart");
            break;
        case 'suricata':
            configd_run("ids restart");
            break;
        default:
            log_error(sprintf(gettext("Could not restart unknown service `%s'"), $name));
            break;
    }
    return sprintf(gettext("%s has been restarted."), htmlspecialchars($name));
}
開發者ID:8191,項目名稱:opnsense-core,代碼行數:68,代碼來源:status_services.php

示例2: write_config

            }
        }
        if ($changecount > 0) {
            write_config($changedesc);
        }
        $retval = 0;
        $retval = system_hostname_configure();
        $retval |= system_hosts_generate();
        $retval |= system_resolvconf_generate();
        if (isset($config['dnsmasq']['enable'])) {
            $retval |= services_dnsmasq_configure();
        } elseif (isset($config['unbound']['enable'])) {
            $retval |= services_unbound_configure();
        }
        $retval |= system_timezone_configure();
        $retval |= system_ntp_configure();
        if ($olddnsallowoverride != $config['system']['dnsallowoverride']) {
            $retval |= send_event("service reload dns");
        }
        // Reload the filter - plugins might need to be run.
        $retval |= filter_configure();
        $savemsg = get_std_save_message($retval);
    }
    unset($ignore_posted_dnsgw);
}
$pgtitle = array(gettext("System"), gettext("General Setup"));
include "head.inc";
if ($input_errors) {
    print_input_errors($input_errors);
}
if ($savemsg) {
開發者ID:LFCavalcanti,項目名稱:pfsense,代碼行數:31,代碼來源:system.php

示例3: write_config

                    }
                }
            }
        }
        write_config();
        system_hostname_configure();
        system_hosts_generate();
        system_resolvconf_generate();
        if (isset($config['dnsmasq']['enable'])) {
            services_dnsmasq_configure();
        } elseif (isset($config['unbound']['enable'])) {
            services_unbound_configure();
        }
        system_timezone_configure();
        system_firmware_configure();
        system_ntp_configure();
        if ($olddnsallowoverride != $config['system']['dnsallowoverride']) {
            configd_run("dns reload");
        }
        // Reload the filter - plugins might need to be run.
        filter_configure();
        $savemsg = get_std_save_message();
    }
    unset($ignore_posted_dnsgw);
}
legacy_html_escape_form_data($pconfig);
include "head.inc";
?>

<body>
    <?php 
開發者ID:reelsense,項目名稱:core,代碼行數:31,代碼來源:system_general.php


注:本文中的system_ntp_configure函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。