From dcf0e613e10867a177886113ae6230ef7b112923 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Thu, 23 Jun 2016 06:52:29 +0400 Subject: [PATCH] =?UTF-8?q?module=20apache:=20ajout=20de=20HTDOCSBASE=20po?= =?UTF-8?q?ur=20le=20d=C3=A9ploiement=20multi-hom=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ulib/apache | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/ulib/apache b/lib/ulib/apache index 75d16f2..dbb4969 100644 --- a/lib/ulib/apache +++ b/lib/ulib/apache @@ -135,6 +135,14 @@ function get_default_apachesitesdir_prefix() { fi } +function get_default_htdocsbase_prefix() { + if check_sysinfos -s darwin; then + __apache_prefixes_checkdir /Library/WebServer/Documents + elif check_sysinfos -s linux; then + __apache_prefixes_checkdir /var/www + fi +} + function get_default_htdocsdir_prefix() { if check_sysinfos -s darwin; then __apache_prefixes_checkdir /Library/WebServer/Documents @@ -178,12 +186,13 @@ function __compute_apache_prefixes() { APACHECONF="${APACHECONF:-$(get_default_apacheconf_prefix)}" APACHEAVSITESDIR="${APACHEAVSITESDIR:-$(get_default_apacheavsitesdir_prefix)}" APACHESITESDIR="${APACHESITESDIR:-$(get_default_apachesitesdir_prefix)}" + HTDOCSBASE="${HTDOCSBASE:-$(get_default_htdocsbase_prefix)}" HTDOCSDIR="${HTDOCSDIR:-$(get_default_htdocsdir_prefix)}" CGIBINDIR="${CGIBINDIR:-$(get_default_cgibindir_prefix)}" __apache_prefixes=1 } -APACHE_PREFIXES=(APACHEBIN APACHEVERSION APACHECTL APACHELOGDIR APACHESSLCERTSDIR APACHESSLKEYSDIR APACHECONFDIR APACHECONF APACHEAVSITESDIR APACHESITESDIR HTDOCSDIR CGIBINDIR) +APACHE_PREFIXES=(APACHEBIN APACHEVERSION APACHECTL APACHELOGDIR APACHESSLCERTSDIR APACHESSLKEYSDIR APACHECONFDIR APACHECONF APACHEAVSITESDIR APACHESITESDIR HTDOCSBASE HTDOCSDIR CGIBINDIR) UTOOLS_PREFIXES=("${UTOOLS_PREFIXES[@]}" "${APACHE_PREFIXES[@]}") function compute_apache_prefixes() { @@ -249,6 +258,11 @@ function get_APACHESITESDIR_prefix() { echo "$APACHESITESDIR" } +function get_HTDOCSBASE_prefix() { + __compute_apache_prefixes + echo "$HTDOCSBASE" +} + function get_HTDOCSDIR_prefix() { __compute_apache_prefixes echo "$HTDOCSDIR"