本文整理汇总了PHP中maincf_multi::buildconf方法的典型用法代码示例。如果您正苦于以下问题:PHP maincf_multi::buildconf方法的具体用法?PHP maincf_multi::buildconf怎么用?PHP maincf_multi::buildconf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类maincf_multi
的用法示例。
在下文中一共展示了maincf_multi::buildconf方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_all_aliases
function build_all_aliases()
{
MysqlInstancesList();
if (!is_array($GLOBALS["INSTANCES_LIST"])) {
echo "Starting......: " . date("H:i:s") . " Postfix No instances, aborting\n";
return;
}
reset($GLOBALS["INSTANCES_LIST"]);
while (list($num, $ligne) = each($GLOBALS["INSTANCES_LIST"])) {
$hostname = $ligne;
echo "Starting......: " . date("H:i:s") . " Postfix \"{$hostname}\" checking aliases\n";
$maincf = new maincf_multi($hostname);
$maincf->buildconf();
$results = array();
exec("{$GLOBALS["postmulti"]} -i postfix-{$hostname} -p reload 2>&1", $results);
while (list($a, $b) = each($results)) {
echo "Starting......: " . date("H:i:s") . " Postfix \"{$hostname}\" {$b}\n";
}
}
}
示例2: ConfigureMainCF
function ConfigureMainCF($hostname)
{
if (strlen(trim($hostname)) < 3) {
return null;
}
$users = new usersMenus();
$unix = new unix();
echo "Starting......: Postfix checking instance {$hostname}\n";
$instance_path = "/etc/postfix-{$hostname}";
if (!is_file("{$instance_path}/dynamicmaps.cf")) {
echo "Starting......: Postfix {$hostname} creating dynamicmaps.cf\n";
@file_put_contents("{$instance_path}/dynamicmaps.cf", "#");
}
$maincf = new maincf_multi($hostname);
reconfigure_instance_mime_checks($myhostname);
$maincf->buildconf();
$assp = new assp_multi($ou);
if ($assp->AsspEnabled == 1) {
shell_exec(LOCATE_PHP5_BIN2() . " " . dirname(__FILE__) . "/exec.assp-multi.php --org \"{$ou}\"");
}
shell_exec("{$GLOBALS["postmulti"]} -i postfix-{$hostname} -e enable");
_start_instance($hostname);
}