From 1889b48e35d1ba5289bc0474b5e5e725825f619d Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 27 Jun 2012 15:32:17 +0200 Subject: [PATCH] Activation de mozilla MCD depuis la DB --- .../e-smith/db/configuration/defaults/mozilla-mcd/access | 1 + .../e-smith/db/configuration/defaults/mozilla-mcd/status | 1 + .../e-smith/db/configuration/defaults/mozilla-mcd/type | 1 + .../etc/httpd/conf/httpd.conf/99MozMcdThunderbird | 16 +++++++++++++++- 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 root/etc/e-smith/db/configuration/defaults/mozilla-mcd/access create mode 100644 root/etc/e-smith/db/configuration/defaults/mozilla-mcd/status create mode 100644 root/etc/e-smith/db/configuration/defaults/mozilla-mcd/type diff --git a/root/etc/e-smith/db/configuration/defaults/mozilla-mcd/access b/root/etc/e-smith/db/configuration/defaults/mozilla-mcd/access new file mode 100644 index 0000000..3e18ebf --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/mozilla-mcd/access @@ -0,0 +1 @@ +private diff --git a/root/etc/e-smith/db/configuration/defaults/mozilla-mcd/status b/root/etc/e-smith/db/configuration/defaults/mozilla-mcd/status new file mode 100644 index 0000000..86981e6 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/mozilla-mcd/status @@ -0,0 +1 @@ +enabled diff --git a/root/etc/e-smith/db/configuration/defaults/mozilla-mcd/type b/root/etc/e-smith/db/configuration/defaults/mozilla-mcd/type new file mode 100644 index 0000000..1b93c9e --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/mozilla-mcd/type @@ -0,0 +1 @@ +webapp diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/99MozMcdThunderbird b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/99MozMcdThunderbird index f6341cd..74d7582 100644 --- a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/99MozMcdThunderbird +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/99MozMcdThunderbird @@ -1,3 +1,11 @@ +{ + +if ((${'mozilla-mcd{'status'} || 'disabled')eq 'enabled'){ + my $access = ${'mozilla-mcd'}{'access'} || 'private'; + $access = ($access eq 'public') ? "all":"$localAccess $externalSSLAccess"; + + $OUT .=<<"EOF"; + Alias /thunderbird.cfg /usr/share/mozilla-mcd/thunderbird.php @@ -5,9 +13,15 @@ Alias /thunderbird.cfg /usr/share/mozilla-mcd/thunderbird.php php_admin_value open_basedir /usr/share/mozilla-mcd Order deny,allow Deny from all - Allow from {"$localAccess $externalSSLAccess";} + Allow from $access order deny,allow Deny from all + +EOF +} +else{ + $OUT .= "# Mozilla MCD is disabled\n"; +}