本文整理汇总了PHP中VirtualHost::addParkedDomain方法的典型用法代码示例。如果您正苦于以下问题:PHP VirtualHost::addParkedDomain方法的具体用法?PHP VirtualHost::addParkedDomain怎么用?PHP VirtualHost::addParkedDomain使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VirtualHost
的用法示例。
在下文中一共展示了VirtualHost::addParkedDomain方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
if (isset($cmdParameters['ns']) && is_array($cmdParameters['ns'])) {
$ns = $cmdParameters['ns'];
} elseif (isset($cmdParameters['ns'])) {
$ns = array($cmdParameters['ns']);
} else {
$ns = array();
}
// Set parameters - mail exchange server(s)
if (isset($cmdParameters['mx']) && is_array($cmdParameters['mx'])) {
$mx = $cmdParameters['mx'];
} elseif (isset($cmdParameters['mx'])) {
$mx = array($cmdParameters['mx']);
} else {
$mx = array();
}
$rc = $vhost->addParkedDomain($cmdParameters['add-pdomain'], $ns, $mx);
if ($rc === false) {
Log::error('Error while adding new parked domain');
exit(9);
}
} elseif (isset($cmdParameters['remove-pdomain'])) {
$rc = $vhost->removeParkedDomain($cmdParameters['remove-pdomain']);
if ($rc === false) {
Log::error('Error while removing parked domain');
exit(9);
}
} else {
Log::error('Parameter error');
exit(9);
}
exit;
示例2: exit
exit(9);
}
// Convert passwd to use the new uid/gid
$rc = convertPasswd($vhost->home . '/' . $vhost->unixName . '/etc/' . $vhost->domainName . '/passwd', $uid, $gid);
if ($rc === false) {
Log::error('Error while converting passwd format');
exit(9);
}
// Set ownership for passwd and shadow
touch($vhost->home . '/' . $vhost->unixName . '/etc/' . $vhost->domainName . '/passwd');
chgrp($vhost->home . '/' . $vhost->unixName . '/etc/' . $vhost->domainName . '/passwd', 'dovecot');
touch($vhost->home . '/' . $vhost->unixName . '/etc/' . $vhost->domainName . '/shadow');
chgrp($vhost->home . '/' . $vhost->unixName . '/etc/' . $vhost->domainName . '/shadow', 'dovecot');
// Create parked domains and insert to database
foreach ($parkedDomains as $p) {
$rc = $vhost->addParkedDomain($p);
if ($rc === false) {
Log::error('Error while adding new parked domain');
exit(9);
}
}
// Install forwarders
foreach ($forwarders as $d => $f) {
installForwarder($vhost, $d, $f);
}
// Run restorecon to make sure all SELinux contexts are correct
exec('/usr/sbin/restorecon -r ' . escapeshellarg($vhost->home));
// Access rights - needs to be reset because it is overwritten during the untar procedure
chmod($vhost->home . '/' . $vhost->unixName . '/etc', 0751);
// Install cron
if ($cron != '') {