ispman/install-data/templates vhost.ldif.template,NONE,1.1
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/install-data/templates
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21297/install-data/templates
Added Files:
vhost.ldif.template
Log Message:
moving vhost creation logic from ApacheMan.pm to new vhost.ldif.template to allow easier customisations
--- NEW FILE: vhost.ldif.template ---
dn: <perl>$r->param("dn")</perl>
<perl>
$text = '';
foreach my $oc (@{$ispman->getConf('ispmanVhostObjectclasses')}) {
$text .= "objectClass: " . $oc . "\n";
}
$text
</perl>
ispmanVhostName: <perl>$r->param("ispmanVhostName")</perl>
cn: <perl>join '.', ($r->param("ispmanVhostName"), $r->param("ispmanDomain"))</perl>
uidNumber: <perl>$ispman->getUid()</perl>
gidNumber: <perl>$r->param("domain_info")->{'gidNumber'}</perl>
ispmanDomain: <perl>$r->param("ispmanDomain")</perl>
uid: <perl>join '.' , ($r->param("ispmanVhostName"), $r->param("ispmanDomain"))</perl>
homeDirectory: <perl>$r->param("homeDirectory") ||
(join "/",($domain_info->{'homeDirectory'},
"vhosts", $r->param("ispmanVhostName")))</perl>
userPassword: <perl>$ispman->encryptPassWithMethod($r->param("userPassword"),
$ispman->getConf('userPassHashMethod'))</perl>
loginShell: <perl>$ispman->getConf("vhostShell")</perl>
ispmanVhostServerAlias: <perl>$r->param("ispmanVhostServerAlias") || ""</perl>
FTPStatus: <perl>$r->param("FTPStatus") || ""</perl>
ispmanVhostStats: <perl>$r->param("ispmanVhostStats") || ""</perl>
FTPQuotaMBytes: <perl>$r->param("FTPQuotaMBytes") || ""</perl>
ispmanVhostDocumentRoot: <perl>$r->param("ispmanVhostDocumentRoot") || "htdocs"</perl>
ispmanVhostScriptDir: <perl>$r->param("ispmanVhostScriptDir") || "cgi-bin"</perl>
ispmanVhostIpAddress: <perl>$r->param("ispmanVhostIpAddress") || $self->getConf("apacheVhostsIP") || "*"</perl>
fileHost: <perl>$r->param("fileHost") || $domain_info->{'ispmanDomainDefaultFileServer'}</perl>
DestinationAddress: <perl>$r->param("fileHost") || $domain_info->{'ispmanDomainDefaultFileServer'}</perl>
<perl>
$text = '';
foreach my $option ($ispman->as_array($r->param("ispmanVhostDocumentRootOption"))) {
$text .= "ispmanVhostDocumentRootOption: " . $option . "\n";
}
foreach my $option ($ispman->as_array($r->param("ispmanVhostScriptDirOption"))) {
$text .= "ispmanVhostScriptDirOption: " . $option . "\n";
}
$text;
</perl>
<perl>
"ispmanVhostExtraConf: " . $r->param("ispmanVhostExtraConf") . "\n" if $r->param("ispmanVhostExtraConf")
</perl>
<perl>
$text = '';
foreach my $webhost ($ispman->as_array($r->param("webHosts"))) {
$text .= "webHost: " . $webhost . "\n";
}
$text;
</perl>
<perl>
$substmap={ vhost => $r->param("ispmanVhostName"), domain => $r->param("ispmanDomain")};
# process ispmanVhostLogdir
$text = "ispmanVhostLogdir: " . $r->param("ispmanVhostLogdir") ||
$ispman->substitute($ispman->getConf('apacheLogsDirectory'),$substmap);
$text .= "ispmanVhostStatdir: " . $r->param("ispmanVhostStatdir") ||
$ispman->substitute($ispman->getConf('apacheStatDirectory'),$substmap);
$text;
</perl>
<perl>
#If there is a site specific file load and evaluate it
$template=$ispman->getTemplate(join "/", ($ispman->getConf("installDir"), "templates/vhost.ldif.template.local"));
return $template->fill_in(PACKAGE => __PACKAGE__);
</perl>
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click