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 = '';