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