From 1959930f1ae67b0ddb8430c2c3d4232ac504a913 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 30 Jul 2014 11:50:20 +0200 Subject: [PATCH] Create a vhost for phplist --- ...n-init-domain => ipasserelle-lists-init-domain} | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) rename root/etc/e-smith/events/actions/{ipasserelle-mailman-init-domain => ipasserelle-lists-init-domain} (70%) diff --git a/root/etc/e-smith/events/actions/ipasserelle-mailman-init-domain b/root/etc/e-smith/events/actions/ipasserelle-lists-init-domain similarity index 70% rename from root/etc/e-smith/events/actions/ipasserelle-mailman-init-domain rename to root/etc/e-smith/events/actions/ipasserelle-lists-init-domain index b40e9ab..8b7cd98 100644 --- a/root/etc/e-smith/events/actions/ipasserelle-mailman-init-domain +++ b/root/etc/e-smith/events/actions/ipasserelle-lists-init-domain @@ -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"; + } +} +