本文整理匯總了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);
}