当前位置: 首页>>代码示例>>PHP>>正文


PHP VirtualHost::addParkedDomain方法代码示例

本文整理汇总了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;
开发者ID:noumenia,项目名称:aetolos,代码行数:31,代码来源:parkeddomainsmanager.inc.php

示例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 != '') {
开发者ID:noumenia,项目名称:aetolos,代码行数:31,代码来源:import.inc.php


注:本文中的VirtualHost::addParkedDomain方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。