Create a vhost for phplist

This commit is contained in:
Daniel Berteaud 2014-07-30 11:50:20 +02:00
parent 7b21d9df59
commit 1959930f1a
1 changed files with 21 additions and 1 deletions

View File

@ -36,8 +36,9 @@ if (!$vhost){
$d->new_record("listes.$domain",{
type => 'domain',
Content => 'Primary',
Description => "Mailinglist",
Description => "Mailinglist (Mailman)",
Nameservers => 'internet',
Removable => 'yes',
});
unless ( system("/sbin/e-smith/signal-event", "domain-create", "listes.$domain") == 0 ){
@ -45,3 +46,22 @@ if (!$vhost){
}
}
$vhost = $d->get("news.$domain");
if (!$vhost){
$d->new_record("news.$domain",{
type => 'domain',
Content => 'Primary',
Description => "Listes de diffusions (PHPList)",
Nameservers => 'internet',
TemplatePath => 'WebAppVirtualHost',
DocumentRoot => '/usr/share/phplist/www',
Removable => 'yes',
Authentication => 'LemonLDAP'
});
unless ( system("/sbin/e-smith/signal-event", "domain-create", "news.$domain") == 0 ){
die "Failed to create domain news.$domain\n";
}
}