本文整理匯總了PHP中maincf_multi::PostfixMainCfDefaultInstance方法的典型用法代碼示例。如果您正苦於以下問題:PHP maincf_multi::PostfixMainCfDefaultInstance方法的具體用法?PHP maincf_multi::PostfixMainCfDefaultInstance怎麽用?PHP maincf_multi::PostfixMainCfDefaultInstance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類maincf_multi
的用法示例。
在下文中一共展示了maincf_multi::PostfixMainCfDefaultInstance方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: CheckInstances
function CheckInstances()
{
$pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
$unix = new unix();
if ($unix->process_exists(@file_get_contents($pidfile))) {
echo "Starting......: " . date("H:i:s") . " CheckInstances function already executed PID " . @file_get_contents($pidfile) . "\n";
die;
}
$pid = getmypid();
echo "Starting......: " . date("H:i:s") . " CheckInstances configurator running {$pid}\n";
file_put_contents($pidfile, $pid);
$maincf = new maincf_multi("");
$maincf->PostfixMainCfDefaultInstance();
$sql = "SELECT `value` FROM postfix_multi WHERE `key`='myhostname' GROUP BY `value`";
echo "Starting......: " . date("H:i:s") . " Postfix activate HUB(s)\n";
$q = new mysql();
$results = $q->QUERY_SQL($sql, "artica_backup");
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$myhostname = trim($ligne["value"]);
if ($myhostname == null) {
continue;
}
if ($myhostname == "master") {
continue;
}
echo "Starting......: " . date("H:i:s") . " Postfix \"{$myhostname}\" checking HUB\n";
ConfigureMainCF($myhostname);
}
@unlink($pidfile);
}
示例2: CheckInstances
function CheckInstances()
{
$maincf = new maincf_multi("");
$maincf->PostfixMainCfDefaultInstance();
$sql = "SELECT `value` FROM postfix_multi WHERE `key`='myhostname' GROUP BY `value`";
echo "Starting......: Postfix activate HUB(s)\n";
$q = new mysql();
$results = $q->QUERY_SQL($sql, "artica_backup");
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$myhostname = trim($ligne["value"]);
if ($myhostname == null) {
continue;
}
echo "Starting......: Postfix checking HUB {$myhostname}\n";
ConfigureMainCF($myhostname);
}
}