From eed9d58dfe8aae60672b5e3e3864f61a707125de Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 20 Nov 2013 11:00:41 +0100 Subject: [PATCH] Change Ajaxplorer -> Pydio on the portal and create a second vhost echangeapi which also point on Pydio but with a basic auth interface (managed by LL::NG) --- .../events/actions/ipasserelle-webapps-init-domains | 19 +++++++++++++++++++ .../var/lib/lemonldap-ng/conf/lmConf/040pydio | 13 +++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/root/etc/e-smith/events/actions/ipasserelle-webapps-init-domains b/root/etc/e-smith/events/actions/ipasserelle-webapps-init-domains index 2c5c667..3145f6c 100644 --- a/root/etc/e-smith/events/actions/ipasserelle-webapps-init-domains +++ b/root/etc/e-smith/events/actions/ipasserelle-webapps-init-domains @@ -94,6 +94,25 @@ elsif (($vhost->prop('DocumentRoot') || '/usr/share/pydio') eq '/usr/share/ajaxp } } +$vhost = $d->get("echangeapi.$domain"); + +if (!$vhost){ + $d->new_record("echangeapi.$domain",{ + type => 'domain', + Content => 'Primary', + Description => "Pydio API", + Nameservers => 'internet', + TemplatePath => 'WebAppVirtualHost', + DocumentRoot => '/usr/share/pydio', + Removable => 'yes', + Authentication => 'LemonLDAPBasic' + }); + + unless ( system("/sbin/e-smith/signal-event", "domain-create", "echangeapi.$domain") == 0 ){ + die "Failed to create domain echangeapi.$domain\n"; + } +} + $vhost = $d->get("wiki.$domain"); if (!$vhost){ diff --git a/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/040pydio b/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/040pydio index 23a988c..6cb6f1f 100644 --- a/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/040pydio +++ b/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/040pydio @@ -10,17 +10,22 @@ $conf->{'locationRules'}->{"echange.$domain"} = { 'default' => 'accept' } unless ($conf->{'locationRules'}->{"echange.$domain"}); +$conf->{'vhostOptions'}->{"echange.$domain"} = { + 'vhostAliases' => "echangeapi.$domain" +} unless ($conf->{'vhostOptions'}->{"echange.$domain"}); -$conf->{'applicationList'}->{'010apps'}->{'ajaxplorer'} = { +$conf->{'applicationList'}->{'010apps'}->{'pydio'} = { 'options' => { - 'logo' => 'ajaxplorer.png', + 'logo' => 'pydio.png', 'name' => 'Gestion des fichiers', - 'description' => 'Gestionnaire de fichiers web Ajaxplorer', + 'description' => 'Gestionnaire de fichiers web Pydio', 'uri' => "https://echange.$domain/", 'display' => 'auto' }, 'type' => 'application' -} unless ($conf->{'applicationList'}->{'010apps'}->{'ajaxplorer'}); +} unless ($conf->{'applicationList'}->{'010apps'}->{'pydio'}); + +delete $conf->{'applicationList'}->{'010apps'}->{'ajaxplorer'}; $OUT = '';